"TPGBrennan" <TPGBrennan@xxxxxx> wrote in message
news:18D39157-2A2E-4E8E-8603-98B695889326@xxxxxx
>I have a script that writes all the A record information from a DNS server
>to
> a CSV file. It reports the time stamp used for scavenging in the NT time
> format of hours since 1601. I added a few lines to convert this to a
> format
> that gives a timestamp value that can be converted using w32tm.exe /ntte
> to a
> useable date. However, I can not figure out how to make this conversion
> in
> the VBScript itself. The script returns thousands of records and it is
> not
> realistic to manually convert each timestamp using w32tm in a separate
> command window. I have heard this issue is resolved with 2008; supposedly
> it
> returns the timestamp in a real date format. Unfortunately, all of my DNS
> servers still run on 2003
>
> My question is how can I get all the timestamps to report as useable
> dates? I link examples of two VBScript functions to convert Integer8 (64-bit
values) to dates here:
http://www.rlmueller.net/Integer8Attributes.htm
The second function uses the Exec method of the wshShell object to run
w32tm. The first does the math manually, including converting to the local
time zone.
The Integer8 value is actually the number of 100-nanosecond intervals since
12:00 am January 1, 1601, in UTC.
--
Richard Mueller
MVP Directory Services
Hilltop Lab -
http://www.rlmueller.net
--