Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

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.

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

Release notes

  • Version 11.2
    • Added milliseconds for SQL.ConvertDateTimeFromSQL and SQL.ConvertDateTimeToSQL functions.
    • Added SQL.ConvertDateTimeFromSQL and SQL.ConvertDateTimeToSQL functions.

Created 27th April 2021, last changed 3th May 2021


SQL.Connect - SQL.ConvertDateTimeToSQL

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins

Start Chat