The Date Data Type
Documentation | Blog | Demos | Support
The Date Data Type
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
DATE indicates that a value consists of eight digits representing a date in the form YYYYMMDD. For example, 19990821 is August 21, 1999.
Note: If you are using Zim in conjunction with a third-party SQL database engine, the format of dates can differ from that described here. In such cases, your code must avoid making any assumptions about the format of date fields.
Dates and numbers can be freely interchanged. When a number is converted to a date, the number is assumed to adhere to the YYYYMMDD format, so that dividing the number by 10,000 (for example) yields the year. You can subtract one date from another to find the number of days between them, or you can add or subtract a number of days to or from a date to generate another date (i.e., date arithmetic).
The software provides a number of functions to manipulate DATE values. These functions ($year, $ monthname, $ addmonths, $weekday, etc) are described in the Language Reference book of this online help.
Date Data Type Characteristics
Data Type | Decimals | Valid Range | Storage Occupied |
DATE | None | January 1, 0001 to December 31, 9999 | Eight bytes |
See Also
Data Types and Storage of Values
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |