CitectVBA Programming Reference > Understanding CitectVBA Language Basics > Date and Time Handling > Dates in Databases Using Different Calendars

Dates in Databases Using Different Calendars

If you use an existing database with date references of a different calendar type than your current operation system locality settings, CitectVBA could report a variety of errors or perform in an unexpected manner at runtime. For example, if you have used Hijri Calendar dates in your database, a syntax error message will occur if CitectVBA makes reference to Gregorian dates that are invalid Hijri dates (for example, the 31st of any month will produce a syntax error because no Hijri month has 31 days).

UNINTENDED EQUIPMENT OPERATION

Always confirm that calendar types in existing databases are compatible with the locality (regional and language) options of the operating system.

Failure to follow these instructions can result in death, serious injury, or equipment damage.

To avoid problems of this sort, all date references in an external database should be based on the Gregorian Calendar, or the database tables can be exported to text files before use in CitectSCADA. Dates in Microsoft Access database tables exported as text files are always stored as Gregorian values. If the database calendar is set to Hijri for example, automatic Hijri to Gregorian conversion is performed during the export process.

You can't set a database calendar programmatically using CitectVBA.

Note: When you want to use characters for Baltic, Central European, Cyrillic, Greek, Turkish, and Asian languages, or right-to-left languages (Arabic, Hebrew, Farsi, and Urdu) the operating system would need to have the corresponding language version of Windows, or have installed system support for that language.

See Also

Date Handling