Date and time formats can be set from the table and from many locations in Strater. Date and time options are case sensitive. Months always need to be entered with upper case M and minutes must always be entered with lower case m.
When dates are parsed during input/import, the month and day of week names must match those of the local language as set in the Windows Control Panel, otherwise the entry will not be recognized as a valid date and will be treated as a text string.
When the recognized format is ambiguous (i.e. 10/7/12), the month, day, and year order is determined by the Windows locale. In some countries, this will be recognized as M/d/yy, in others as d/M/yy, and in others as YY/M/d. It is important to use non-ambiguous date/time formats when the Windows locale may change.
In the table, save data files containing date/time formatting as Excel files to preserve the date time formatting as seen in the table.
You can save date/time-formatted data files as ASCII files (.DAT, .CSV, .TXT, .BNA, or BLN). Sometimes this is necessary if you exceed the Excel row or column limits. When opening the file in Strater, you can make the serial dates appear in date/time format by using Data | Format | Format Cells.
If you have formatted the data as date/time in another spreadsheet program such as Excel, the data are formatted as date/time in Strater.
Whenever possible, enter and display dates and times in one of the many calendar formats, e.g., "6/14/2009” or “14-June-2009”, and let the software handle converting to/from internal numeric representations.
When the recognized format is ambiguous (i.e. 10/7/12), the month, day, and year order is determined by the Windows locale. In some countries, this will be recognized as M/d/yy, in others as d/M/yy, and in others as YY/M/d. It is important to use non-ambiguous date/time formats when the Windows locale may change. The date order and data file locale can be set in the Data Import Options dialog when importing data files from different locales.
If dates/times occur before 1/1/0000, use the BC or BCE suffix after the date. So, Alexander III of Macedon's birthday would be listed as 20-July-356 BCE in the worksheet. Using AD or CE is not necessary and the worksheet will automatically remove these in dates after 1/1/0000.
The year 0 is defined, according to the ISO 8601:2004 standard.
When a two digit year is input in the table (00 to 99), it means the year in the current century. For instance, inputting 11/4/13, indicates that the year is 2013, not 0013. In order to have the year 0013, the full four digits (0013) must be input for the date. So, the date would be input as 11/4/0013 CE for November 4, 0013 CE or 11/4/0013 BCE for November 4, 0013 BCE.
These are the defined date and time formats. These can be used in the worksheet Format Cells dialog, in the Property Manager label format section, or from the Text Editor's Date/Time Format Builder dialog. Any combination of these formats can be used in any of the locations.
All rows below use the date July 9, 2014 at 6:45:44.12345 in the evening for the Example.
Date/Time Code |
Example |
Description |
d |
9 |
Single digit day, excluding leading zero |
dd |
09 |
Double digit day, including leading zero |
ddd |
Wed |
Shortened day of week name |
dddd |
Wednesday |
Full day of week name |
M |
7 |
Single digit month, excluding leading zero |
MM |
07 |
Double digit month, including leading zero |
MMM |
Jul |
Shortened month name |
MMMM |
July |
Full month name |
MMMMM |
J |
First letter of month name |
yy |
98 |
Two digit year |
yyyy |
1998 |
Full year |
g |
|
Before Common Era designator - Includes space and bce or nothing if ce, lower case |
gg |
ad |
BC/AD designator - Includes space and bc or ad, lower case |
ggg |
ce |
Before Common Era designator - Includes space and bce or ce, lower case |
G |
|
Before Common Era designator - Includes space and BCE or nothing if CE, upper case |
GG |
AD |
BC/AD designator - Includes space and BC or AD, upper case |
GGG |
CE |
Before Common Era designator - Includes space and BCE or CE, upper case |
h |
6 |
Single digit hours - 1-12, excluding leading zero |
hh |
06 |
Double digit hours - 01-12, including leading zero |
H |
18 |
Hours - 0-23 military, excluding leading zero |
HH |
18 |
Hours - 00-23 military, including leading zero |
[h] |
1003914 |
Hours portion of total time, excludes leading zeros |
m |
45 |
Minutes - 0-60, excluding leading zero |
mm |
45 |
Minutes - 00 to 60, including leading zero |
[mm] |
45 |
Minutes portion of total time, includes leading zeros |
ss |
44 |
Seconds - 0-60, rounded to the nearest second |
ss.0 |
44.1 |
Seconds - 0-60, rounded to the nearest tenth of a second |
ss.00 |
44.12 |
Seconds - 0-60, rounded to the nearest hundredth of a second |
ss.000 |
44.123 |
Seconds - 0-60, rounded to the nearest millisecond |
ss.0000 |
44.12345 |
Seconds - 0-60, maximum precision |
[ss] |
44 |
Seconds portion of total time, includes leading zeros |
tt |
pm |
am or pm designator, lower case |
TT |
PM |
AM or PM designator, upper case |
\ |
|
escape character - output next character verbatim |
'...' |
|
output ALL characters between single quotes verbatim, including escape character |
[$-xxxx] |
[$-409] |
xxxx is an up to four hex digit representation of a locale ID |
See Also