Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
SQL.ConvertDateTimeFromSQL
Converts a date or timestamp to FileMaker format.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
SQL | 11.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "SQL.ConvertDateTimeFromSQL"; Value ) More
Parameters
Parameter | Description | Example |
---|---|---|
Value | The text value. | "2008-05-13T06:20:56" |
Result
Returns date, time, timestamp or error.
Description
Converts a date or timestamp to FileMaker format.Localization of FileMaker time and date formats applies. Examples below are in German format.
This function doesn't do time zones.
If you use SQL record sets, you don't need this function, but SQL.GetFieldAsTime, SQL.GetFieldAsDateTime, SQL.GetFieldAsDate, SQL.GetParamAsTime, SQL.GetParamAsDateTime and SQL.GetParamAsDate do similar conversion for you internally.
Examples
Convert time stamp:
MBS( "SQL.ConvertDateTimeFromSQL"; "2008-05-13T06:20:56.123456" )
Example result: 13.05.2008 06:20:56,123456
Convert date:
MBS( "SQL.ConvertDateTimeFromSQL"; "2008-05-13" )
Example result: 13.05.2008
Convert time:
MBS( "SQL.ConvertDateTimeFromSQL"; "06:20:56" )
Example result: 06:20:56
Convert now:
MBS( "SQL.ConvertDateTimeFromSQL"; "now" )
See also
- SQL.ConvertDateTimeToSQL
- SQL.GetFieldAsDate
- SQL.GetFieldAsDateTime
- SQL.GetFieldAsTime
- SQL.GetParamAsDate
- SQL.GetParamAsDateTime
- SQL.GetParamAsTime
Release notes
- Version 11.2
- Added milliseconds for SQL.ConvertDateTimeFromSQL and SQL.ConvertDateTimeToSQL functions.
- Added SQL.ConvertDateTimeFromSQL and SQL.ConvertDateTimeToSQL functions.
Blog Entries
- New in MBS FileMaker Plugin 11.2
- MBS FileMaker Plugin, version 11.2pr6
- MBS FileMaker Plugin, version 11.2pr5
This function checks for a license.
Created 27th April 2021, last changed 8th April 2024