1. Home
  2. Options – Date Format

Options – Date Format

Select menu: Tools | Options (Date Format Tab)

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.

  1. From the menu select Tools | Options | then click the Date Format tab.

Default 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

Lets you specify a custom date format which is constructed by a combination of any text, and placeholders (& + a letter) for various time and date components. You can select one of the more common placeholders 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 2 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 2 digits 06
&& Single & in text &

Start dates from

This option lets you specify the base day that all other dates are to be numbered from.

01/3/1600 (Gregorian) The nominal starting day for the Gregorian Calendar
01/1/1900 (Excel) 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 less than XX as 2000s

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 or equal to this value will represent years beginning 19.

For example, if Set 2 digit years less than 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 2 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 whenever practical.

Use language defaults for

Lets you 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 placeholders).

Day used for mmm-yy format

This specifies the day number that is used for a date format where the day is not known. For example, if in a spreadsheet you enter the date Dec-08 the day is not known. For these date formats an underlying date value must be assigned a distinct value for internal storage and calculations. To do this a particular day of the month is assigned for the month and year. You can choose either the Start of Month (1), Mid Month (14,15) or End of Month (28-31) to use as the day to represent the month and year. So for example Dec-08 would have a date value of 1-Dec-2008, or 15-Dec-2008 or 31-Dec-2008 for the start of month, mid month and end of month respectively.

See also

Updated on May 16, 2019

Was this article helpful?