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.

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

Blog Entries

This function checks for a license.

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


SQL.Connect - SQL.ConvertDateTimeToSQL

💬 Ask a question or report a problem