A number in a variate or factor can be interpreted as a time value and displayed in a specified date/time format.
GenStat stores data/time values as 8 byte double precision real values. The integer part of the value is interpreted
as the number of days from a base date, and the fractional component as the time during the day, as a fraction of 24
hours (e.g. 0.25 = 6 hours). Using this representation, the time between two dates can simply be calculated by subtraction
of the two underlying day numbers.
Date format
A list of predefined date and time formats which can be used to display numeric date/time values. When a variate or factor
column is displayed in date format within a spreadsheet it will initially use the default date format. However, you can change
the date format for individual columns within a spreadsheet. The final item in this list is called Custom
and if this is selected you can specify a custom date format in the space provided. A complete list of the
Date/Time formats can be found here.
Custom Date format
Allows you to specify a Custom date format which is constructed by a combination of any text, and
place holders (& + a letter) for various time and date components. You can select one of the more common place holders by
clicking on the > button and selecting the item you want to insert into the text. As an
'&' is used to define a placeholder, you must use a double '&' i.e.
&& if you want an '&' to appear in the text. All the available time/date components
are shown in the following table:
| &A | AM/PM. | AM |
| &a | am/pm. | am |
| &C | Century as a 4 digit number | 2000 |
| &c | Century as a 2 digit number | 20 |
| &D | Day of month 2 digit (i.e. leading 0 for day < 10) | 07 |
| &d | Day of month | 7 |
| &E | Elapsed time in seconds to 2 decimal places | 278.35 |
| &e | Elapsed time in hours to 2 decimal places | 3.45 |
| &H | Hour in the day with leading zero for hour < 10 | 06 |
| &h | Hour in the day | 6 |
| &M | Month number with leading 0 if month < 10 | 08 |
| &m | Month number | 8 |
| &N | Month name in full | January |
| &n | Abbreviated month name | Jan |
| &O | Hour in the half day with leading zero for hour < 10 | 04 |
| &o | Hour in the half day i.e. 1-12 | 4 |
| &S | Seconds in the minute as two digits | 03 |
| &s | Seconds in the minute | 3 |
| &T | 100ths of seconds in the second as two digits | 02 |
| &t | 100ths of seconds in the second | 2 |
| &U | Minutes in the hour as two digits | 09 |
| &u | Minutes in the hour | 9 |
| &W | Day of week as a number 1-7; 1 = Monday etc. | 4 |
| &w | Day of week | Sunday |
| &Y | Year with 4 digits | 2006 |
| &y | Year as two digits | 06 |
| && | Single & in text | & |
Start Dates from
This option allows you to specify the base day that all other dates are to be numbered from.
| 1/3/1600 | The nominal starting day for the Gregorian Calendar |
| 1/1/1900 | The starting day used by spreadsheets such as Excel, Lotus and Quattro |
Month and Day Lists
A list of the available month and day lists. When a list name is selected the contents of the list are displayed in the
List entries field. You can edit the contents of a selected list by clicking the Edit List button.
List Entries
A list of the entries contained within the list, which is selected in the Month and Day list. The list entries can be copied
to the clipboard by clicking anywhere on the list with the right mouse button and selecting Copy
from the pop-up menu.
Set 2 Digit Years
Controls how years specified by two digits are to be interpreted - whether the first two digits are assumed to be either 19
or 20. The value given here specifies the cut-off date: dates less than this value represent years beginning 20, and two digit
dates greater than equal to this value will represent years beginning 19.
For example, if "2 Digit Years" is set to 30, years in the range 00 - 29 will represent the years 2000 - 2029 and years in the
range 30 - 99 represent the years 1930 - 1999.
The setting 0 will ensure that all two-digit dates belong to the 1900s and the setting 100 will mean that they all belong to the 2000s.
A related problem is the representation of years not in the ranges implied by the 2 Digit Years setting. Using the example above,
a date such as 1920 would have to be displayed using 4 digits even if 2 digits had been requested.
For unambiguous interpretation of output, it is recommended that 4 digits are used for displaying years wherever practical.
Use language defaults for
Allows you to control the default language to be used for the month and day names. When a language is
selected the names are automatically changed in the Month and Day lists. The month names can then
be edited if you want to change these from the default values for the language.
Display times without the seconds
Controls whether the seconds are included when displaying times. For example, if selected the time will
be displayed as HH:MM (i.e. 3:24), otherwise it will be displayed as HH:MM:SS (i.e. 3:24:33).
Excel times less than XX days will not be rebased to 1600
When data from Excel in time format do not have a day component (e.g. 0.5 = 12:00), a value of
109513 is added to the column values. When the maximum time in a column is less that the
specified number of days a column will not have 109513 added to the column values. The value
109513 is usually added to Excel dates to change the day number from the Excel base date of
1-Jan-1900 to the GenStat server base date of 1-March-1600. These values still display
correctly as times, but if they are displayed using a date formats they will be displayed
as dates from March 1600, rather than January 1900. Note that this option only applies to
columns which are in time format (DREPRESENTATION values 36-39, and custom formats only
containing hour/minute/second place holders).
Action Buttons
| OK | Save the options and close the dialog. |
| Cancel | Close the dialog without making any changes. |
See Also