Using CitectSCADA > Exchanging Data with Other Applications > Using Structured Query Language > Expressing dates and times in SQL

Expressing dates and times in SQL

The way in which SQL dates are expressed depends upon the particular database system. With dBASE, you normally specify a date in braces, for example {02/18/95}. For Oracle, use the format: to_date(`02/18/95', 'MM/DD/YY'). Other ODBC drivers might require another format - a common ODBC format is: `YYYY-MM-DD'.

Note: Date references in an external database have to be based on the Gregorian Calendar, or the database tables needs to be exported to text files before use in CitectSCADA. Dates in Microsoft Access database tables exported as text files are stored as Gregorian values.