Difference between revisions of "Sys DbDatesAsText"
(Created page with '''new to Analytica 4.2.3'' = SysVar Sys_DbDatesAsText = Most standard relational database systems (including SQL Server, O…') |
|||
Line 1: | Line 1: | ||
− | + | [[Category:System Variables]] | |
− | |||
− | |||
+ | == 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. | 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 | + | 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 | + | 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 <code>True</code> or <code>False</code> 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. | 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. | ||
Line 15: | Line 14: | ||
# Press F12 to open the [[Typescript|Typescript Window]] | # Press F12 to open the [[Typescript|Typescript Window]] | ||
# Enter: <code>Sys_DbDatesAsText : 0</code> | # Enter: <code>Sys_DbDatesAsText : 0</code> | ||
− | :(or <code>Sys_DbDatesAsText : 1</code>) | + | ::(or <code>Sys_DbDatesAsText : 1</code>) |
Once changed, the setting will be saved with your model. | Once changed, the setting will be saved with your model. | ||
− | = | + | ==History== |
+ | Introduced in [[Analytica 4.2 beta Release Notes/Changes in 4.2.3|Analytica 4.2.3]]. | ||
− | * [[DbQuery]] | + | == See Also == |
+ | * [[DbQuery]] | ||
+ | * [[DbWrite]] | ||
+ | * [[DbTable]] | ||
+ | * [[Typescript]] | ||
+ | * [[Preferences]] | ||
+ | * [[Date Functions]] |
Latest revision as of 03:53, 3 February 2016
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:
- Press F12 to open the Typescript Window
- Enter:
Sys_DbDatesAsText : 0
- (or
Sys_DbDatesAsText : 1
)
- (or
Once changed, the setting will be saved with your model.
History
Introduced in Analytica 4.2.3.
Enable comment auto-refresher