Subject FYI: Time Formatting
Author Geoff Worboys
Hi All,

There has been some recent discussion relating to time formatting, and
recently Jason asked whether a constant I had included in IBO was
invalid because it showed the time format as "HH:MM:SS.ZZZ". I have
been doing some related coding and have discovered some information
that may be of interest...

1. VCL time processing WILL accept 'hh:mm' or 'hh:nn' for a time
format. It actually checks if 'M' follows 'H' and automatically
translates it to 'N'. The reason for this is...

2. The time format provided by Windows uses 'm' for minutes (and 'M'
for months). Since the VCL reads the current Windows time format
directly into the ShortTimeFormat and LongTimeFormat global variables
its processing has been forced to deal with the Windows supplied

So, a format of 'hh:mm' will be processed properly. But if you want
the time formated in some strange order (eg: ss:nn:hh) then you MUST
use the 'n' indicator. This is probably only a problem in America
where they insist on using strange spelling and date formats ;-)

For consistency 'hh:nn' is probably the best, but remember to check
for 'm' if you are ever parsing the ShortTimeFormat or LongTimeFormat
global variables.

Geoff Worboys
Telesis Computing