Database Independent Date-Time Syntax
- Last UpdatedJul 13, 2023
- 1 minute read
For database independence, you can use the following syntax for dates and times:
[<format>'YYYY-MM-DD HH:MM:SS.FFFFFF']
Where:
-
<format> (the first character after the opening square bracket) needs to be one of the following:
-
d - date
-
t - time
-
dt - date and time.
-
Whether you are specifying a date, time, or date and time, you need to provide the complete 26 character string, for example:
[d'1995-02-18 00::00.000000']
Refer to the documentation that accompanied your SQL server for further information about SQL commands.