Sys DbDatesAsText

Revision as of 03:53, 3 February 2016 by Bbecane (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SysVar Sys_DbDatesAsText

Most standard relational database systems (including SQL Server, Oracle, MySQL, MS Access, etc) label each table column with a data type. This is part of the table schema within the database. A variety of data types of used by the various database systems, including various numeric, text and date types.

When you query a database table using DbQuery and DbTable and read in data from a column having a date, time, date-time or duration data type, you have the option of returning this data either in a textual form, or as numeric date-times. Textual dates and times are immediately human-readable, but Analytica models usually represent dates and time numerically, as the number of days elapsed since the date origin (usually either 1-Jan-1904 or 1-Jan-1900, depending on your Preferences settings).

The Sys_DbDatesAsText system variable controls the global default behavior for database queries within your model. Individual calls to DbQuery may, optionally, override this global default by specifying a True or False value for the optional «datesAsText» parameter.

If you don't change Sys_DbDatesAsText yourself, it defaults to textual dates so as to maintain consistency with legacy models created in Analytica before release 4.2.3, when the numeric option was not available.

As of Analytica 4.2.3, this system variable can only be set from the typescript window. To change it, following these steps:

  1. Press F12 to open the Typescript Window
  2. Enter: Sys_DbDatesAsText : 0
(or Sys_DbDatesAsText : 1)

Once changed, the setting will be saved with your model.


Introduced in Analytica 4.2.3.

See Also


You are not allowed to post comments.