Jon
Wed Mar 03 19:24:24 CST 2004
nevermind, this old msg
(
http://www.mail-archive.com/activedir@mail.activedir.org/msg09152.html)
shows how to convert the 64bit number to epoch time...which is
something i understand.
On Wed, 03 Mar 2004 15:48:51 -0800, Jon Chan <j0nchan@yahoo.com>
wrote:
>On Tue, 2 Mar 2004 21:54:53 -0600, "Richard Mueller [MVP]"
><rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote:
>
>>Hi,
>>
>>I would say that's a 64-bit number. VBScript cannot deal with 64-bit numbers
>>directly. Some attributes in Active Directory have syntax Integer8, which
>>means 8 bytes or 64-bits. When you deal with these in ADSI you use the
>>IADsLargeInteger interface, which has HighPart and LowPart property methods
>>to break the number up into 32-bit chunks that VBScript can handle. All
>>Integer8 dates that I know of represent the number of 100-nanosecond
>>intervals since 12:00 AM January 1, 1601. The dates are always in UTC
>>(Coordinated Universal Time, or what used to be called GMT), so you have to
>>adjust for the local time zone. If I calculate correctly, your number
>>corresponds to 147207.8956164 days since the zero date, which is 9:29 AM
>>January 16, 2004 UTC (correct for your time zone).
>>
>>How are you seeing this number? Is the IADsLargeInterface available?
>
>i'm pulling the numbers from a veritas database. there are two
>columns, ftoperationstart and ftoperationend, that contain dates in
>this format.
>
>no to IADsLargeIntefeace...? more like, i'm not sure. :) assuming i
>can get this script to work, i'd being running the script locally on a
>2000 Server machine that is in a NT4 domain. i'm more sysadmin than i
>am programmer. :)
>
>is there any easy way to convert the 64bit number without going
>through adsi? or the other way around...where i can convert today's
>date and time to a 64bit number? i just need to check if given date is
>inside or outside a range from today.
>
>thanks for the pointers!
>
>>I discuss Integer8 attributes on this page, which also links a function to
>>convert them to readable dates:
>>
>>
http://www.rlmueller.net/Integer8Attributes.htm
>>
>>--
>>Richard
>>Microsoft MVP Scripting and ADSI
>>HilltopLab web site -
http://www.rlmueller.net