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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Converts a date/time/timestamp to SQL text.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
SQL | 11.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
Value | The date, time or timestamp value. Text or number are converted by FileMaker to get a timestamp. |
Get(CurrentDate ) |
Returns text or error.
Query date:
MBS( "SQL.ConvertDateTimeToSQL"; Get(CurrentDate ))
Example result: 2021-04-27
Query time:
MBS( "SQL.ConvertDateTimeToSQL"; Get(CurrentTime ))
Example result: 15:45:26
Query timestamp:
MBS( "SQL.ConvertDateTimeToSQL"; Get(CurrentTimestamp ))
Example result: 2021-04-27T15:45:44
Query with text:
MBS( "SQL.ConvertDateTimeToSQL"; "27.04.2021 15:46:20,123456" )
Example result: 2021-04-27T15:46:20.123456
Query with number:
MBS( "SQL.ConvertDateTimeToSQL"; 63346256456 )
Example result: 2008-05-13T06:20:56
This function checks for a license.
Created 27th April 2021, last changed 3th May 2021