Local times and system times
- Last UpdatedFeb 27, 2025
- 1 minute read
The Historian Console is date/time format sensitive, but the Historian server is not. However, SQL Server handles converting string values to dates and vice versa in queries and as a result, is sensitive to the date/time format. For example, SQL Server bases its interpretation of "12/30/09" as DMY, MDY, or YMD based on the "default date order" associated with the "Default Language" for the SQL Server login used by the database connection.
Note: You cannot directly set the default date order for a login. You can only set the default language, which has an associated default date order.
If you are using SQL authentication for your logins or you are using Windows authentication and you have an explicit SQL login, changing the date format is straightforward using SQL Management Studio.
If you are using Windows authentication with a Windows group login such as BUILTIN/Administrators, it is not always apparent which group applies to a particular Windows account. If all the logins can use the same date order/language, change them all to that one.
If you need differing date formats, set the default language for new logins with the langid value in the syslanguages table (sys.syslanguages in Transact-SQL). The initial default language is based on the language version of the SQL Server installation. You can use the SET LANGUAGE or SET DATEORDER statements or sp_addlogin or sp_defaultlanguage in Transact-SQL to override the default language for a particular login for a session.