Re: string manipulation experts...

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Joker (no-spam_at_netzero.com)
Date: 09/27/04


Date: Mon, 27 Sep 2004 15:18:36 -0600


Dr John Stockton wrote:
> 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?

Or does it mean March the 3rd?

>
>>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.
>



Relevant Pages

  • Re: string manipulation experts...
    ... Phil Strack posted: ... >AppName is the text name of the application ... Use YYYYMMDD (or YYYY- ... to string. ...
    (microsoft.public.scripting.vbscript)
  • Re: Look what Ive found
    ... I'm not sure what created that entry in my logs. ... > other boxes, found SSH, gathered the init string for it, then ... port isn't considered portscanning. ...
    (comp.os.linux.security)
  • Re: Is it possible to convert ISO date format?
    ... Of course you could refine the pattern for also approximatively ... validating the input string to match YYYYMMDD-format. ... YYYYMMDD into three digit-string fields ... Dim s, dateIso, dateVal ...
    (microsoft.public.scripting.vbscript)
  • Re: Searching for txt file and importing to ms access
    ... Once i have this working i was planing to kept all the txt files as logs, ... >> and save it to a text file, does any one have a link to some sample code ... >> search though a file until a string of characters is matched? ...
    (comp.lang.python)
  • Re: Specify only one application allowed to run
    ... You can set the Reg_Sz string value of; ... Microsoft Certified Professional [Windows 2000] ... | I would like to setup an image viewing station that logs on automatically ...
    (microsoft.public.win2000.general)