Re: string manipulation experts...
From: Dr John Stockton (spam_at_merlyn.demon.co.uk)
Date: 09/24/04
- Next message: sunil: "Re: ACT scripting"
- Previous message: Rafael Chemtob: "page loads up twice"
- In reply to: Phil Strack: "string manipulation experts..."
- Next in thread: Joker: "Re: string manipulation experts..."
- Reply: Joker: "Re: string manipulation experts..."
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 24 Sep 2004 18:39:43 +0100
JRS: In article <#Rml0sXoEHA.3876@TK2MSFTNGP15.phx.gbl>, dated Thu, 23
Sep 2004 10:39:58, seen in news:microsoft.public.scripting.vbscript,
Phil Strack <philstrack@hotmail.com> posted :
>I've inherited a production system that spits out logs that are named
><AppName><Date>.log and <AppName>stdError<Date>.log where
>AppName is the text name of the application
>Date is in the format YYYYmd
>and stdError is literal. (examples: application2004923.log,
>applicationstdError2004923.log)
That is very silly. Does 2004123 represent December 3rd or January
23rd?
>The new naming convention is AppName-<Date>.log and AppName-<Date>-Err.log
>where date is in the format: mmddyyyy. (examples: application-09232004.log,
>application-09232004-Err.log)
That is also silly; you should follow FIPS 4.4 & ISO 8601. Your
predecessor tried to do likewise, but blundered. Use YYYYMMDD (or YYYY-
MM-DD). YYYYMMDD is unambiguous everywhere, and can be sorted as a
string.
YYYYMMDD is easily obtained, for years in 1000 to 9999; let D be a
CDate, form (Year(D)*100 + Month(D))*100 + Day(D) which gives a
number in the range 10000101 to 99991231, and use the default conversion
to string. Note that the unaided method fails for mmddyyyy; for that,
you can use the rightmost 8 characters of 1E8 + (M*100+D)*10000+Y.
-- © John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 © <URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript <URL:http://www.merlyn.demon.co.uk/vb-dates.htm> VB dates, maths, sources. <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
- Next message: sunil: "Re: ACT scripting"
- Previous message: Rafael Chemtob: "page loads up twice"
- In reply to: Phil Strack: "string manipulation experts..."
- Next in thread: Joker: "Re: string manipulation experts..."
- Reply: Joker: "Re: string manipulation experts..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|