Report Magic for Analog Documentation

Date Format Specification

Report Magic uses date formats in several places. Most of them are in the internationalization/advanced-settings files, rdata.ini, cdata.ini and lang.ini. You can also specify a date format in the name of output files and log files in your settings. All of these formats use the same syntax, which allows the date in question (the current date for output and log file names, the data value date for other files) to be formatted any way you like.

Each part of a date (or time) is represented by a mnemonic letter. You can use 'm' for months, 'd' for days, 'y' for years, 'h' for hours or 'n' for minutes and 'w' for day of the week. In general one or two repeated codes (e.g. 'mm') gives a numerical result of at least that many digits (e.g. '09' for September). Numbers will always use all digits in the number. That is, if your format has 'm' and the month is December, then the output will be '12'. Three letters gives an abbreviation for the month or day of the week (the abreviation may not be three letters in all languages). Four letters gives a full month or weekday name. Here are some specifics and examples to help.

The following codes produce results as follows (with english text):

Code Format Notes
m 1,2,3,...,10,11,12
mm 01,02,03,...,10,11,12
mmm Jan,Feb,Mar,...,Dec This will give the standard abbreviation for the language (as specified in lang.ini) which may or may not be three letters.
mmmm January,February,March,...,December
d 1,2,3,...31
dd 01,02,03,...31
y 0,1,2,3,...,99
yy 00,01,02,03,...,99
yyy 000,001,002,003,...,1999, 2000, 2001,... This isn't a very useful option
yyyy 0000,0001,0002,0003,...,1999, 2000, 2001,...
w 1,2,3,...,7
ww Su,Mo,Tu,...,Sa This will always give a two-letter abbreviation of whatever the standard abbreviation is for the language. In some languages, this is the same as 'www'.
www Sun,Mon,Tue,...,Sat This will give the standard abbreviation for the language (as specified in lang.ini) which may or may not be three letters.
wwww Sunday,Monday,Tuesday,...,Saturday
h 0,1,2,3,...24
hh 00,01,02,03,...24
n 0,1,2,3,...24
nn 00,01,02,03,...24
s 0,1,2,3,...24
ss 00,01,02,03,...24
This will add the appropiate text ('am' or 'pm') in the position specified. It will also format the hours in 12-hour format. If you use lower case letters then the output will be lower case. If you use uppercase letters then the output will be uppercase.

The following examples may help to clarify the format specification. Assume an input date of Saturday March 7th, 1998 15:05:32:

Format Output value
mmm d, yyyy Mar 7, 1998
www Sat 07.03.98
wwww mmmm d, yyyy Saturday March 7, 1998
yyyy.m.d 1998.3.7
yyyymmdd 19980307
hh:nn 15:05
hh:nn pm 3:05 pm
hh:nn AM 3:05 PM
h,nn 15,05
yyyymmddhhnn 199803071505

[Introduction] [Documentation map] [Index] [Frequently Asked Questions] [License]

Send questions or comments to Wadsack-Allen Digital Group Support.
Report Magic 2.13 Documentation. Copyright © 1999, 2002 Wadsack-Allen. All Rights Reserved.