is there an easy way to convert a filetime number to something human
readable?

example - i'd like vbscript to translate 127187621812581241 for me.

thanks

Re: filetime human readable? by Ray

Ray
Tue Mar 02 21:21:11 CST 2004

I don't know about other humans, but I do not recognize 127187621812581241
as a time. What time is that? If we can see the before and after instead
of just the before, maybe we can come up with something.

Ray at home

"Jon Chan" <j0nchan@yahoo.com> wrote in message
news:v6ga40t5kc4un474efq1tccj2c63l0lodi@4ax.com...
> is there an easy way to convert a filetime number to something human
> readable?
>
> example - i'd like vbscript to translate 127187621812581241 for me.
>
> thanks



Re: filetime human readable? by Richard

Richard
Tue Mar 02 21:54:53 CST 2004

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

"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:e0kjf3MAEHA.3828@TK2MSFTNGP10.phx.gbl...
> I don't know about other humans, but I do not recognize 127187621812581241
> as a time. What time is that? If we can see the before and after instead
> of just the before, maybe we can come up with something.
>
> Ray at home
>
> "Jon Chan" <j0nchan@yahoo.com> wrote in message
> news:v6ga40t5kc4un474efq1tccj2c63l0lodi@4ax.com...
> > is there an easy way to convert a filetime number to something human
> > readable?
> >
> > example - i'd like vbscript to translate 127187621812581241 for me.
> >
> > thanks
>
>



Re: filetime human readable? by Ray

Ray
Wed Mar 03 10:11:08 CST 2004

I see! Thanks Richard.

Ray at work

"Richard Mueller [MVP]" <rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote in
message news:ejik0QNAEHA.1464@tk2msftngp13.phx.gbl...
> 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 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
> --
>
> "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
> message news:e0kjf3MAEHA.3828@TK2MSFTNGP10.phx.gbl...
> > I don't know about other humans, but I do not recognize
127187621812581241
> > as a time. What time is that? If we can see the before and after
instead
> > of just the before, maybe we can come up with something.
> >
> > Ray at home
> >
> > "Jon Chan" <j0nchan@yahoo.com> wrote in message
> > news:v6ga40t5kc4un474efq1tccj2c63l0lodi@4ax.com...
> > > is there an easy way to convert a filetime number to something human
> > > readable?
> > >
> > > example - i'd like vbscript to translate 127187621812581241 for me.
> > >
> > > thanks
> >
> >
>
>



Re: filetime human readable? by Jon

Jon
Wed Mar 03 17:48:51 CST 2004

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


Re: filetime human readable? by Jon

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