Michael wrote:
Now, you have asked the right question. ;-) See if this helps:
http://www.cflib.org/udf.cfm?ID=1339
Tried to test your function with Johnny's number but it kicks an invalid date
parsing error.
~|
Message:
Someone must have epxerienced this problem before. The number is the lastlogon
date produced by the Active Directory (Windows 2000) when I used LDAP to query
it. Let me know if you know how to parse it now.
Johnny
The number can be a misinterpreted representation of the Unix Epoch time.
Remember the EPOCH times for Unix and Windows are different.
Try this, read the comments I have included for you:
!---
Problem: LDAP date is returned as NANOSECONDS and if you try to write a
function to parse it CFMX returns an error saying the number is too big to fit
in integer
Now, you have asked the right question. ;-) See if this helps:
http://www.cflib.org/udf.cfm?ID=1339
M!ke
-Original Message-
From: Johnny Le [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 04, 2006 12:35 PM
To: CF-Talk
Subject: Re: How to convert a number into date?
Someone must have
Wow, David, that works. Thank you.
Wonder why they chose 1/1/1601 as the starting point.
Johnny
Remember the EPOCH times for Unix and Windows are different.
Try this, read the comments I have included for you:
!---
Problem: LDAP date is returned as NANOSECONDS and if you try
David Strong wrote:
Remember the EPOCH times for Unix and Windows are different.
just an fyi: there are more than 1 windows epoch depending on what you're
doing.
besides the windows file time (ticks or 100 nanoseconds since 1-jan-1601)
there's now also dotnet datetime (ticks since
Johnny Le wrote:
Wonder why they chose 1/1/1601 as the starting point.
because it's the beginning of the last 400-year cycle by which leap-years are
calculated in the Gregorian calendar, which was followed by a new 400-year
cycle
beginning with 2001.
The number can be a misinterpreted representation of the Unix Epoch time.
(The number of seconds passed since January 1 1970 00:00:00).
But I believe your number is way too big.
Please we need more info on the origins of your number.
Hi,
How do I turn this number 127937470871482500 into date? When I tried
isNumericDate(), it returns yes, but I don't know how to display it in a
readable format.
Thanks.
Johnny
~|
Message:
Did you try dateFormat()?
-Original Message-
From: Johnny Le [mailto:[EMAIL PROTECTED]
Sent: Friday, June 02, 2006 7:00 PM
To: CF-Talk
Subject: How to convert a number into date?
Hi,
How do I turn this number 127937470871482500 into date? When I tried
isNumericDate(), it returns yes,
How? I tried dateFormat(number, mm/dd/yy) and it returns 12/02/292269055. I
think it is because it is supposed to return both date and time. Let me know
if you want to format it to display both date and time.
Johnny
Did you try dateFormat()?
-Original Message-
From: Johnny Le
to convert a number into date?
How? I tried dateFormat(number, mm/dd/yy) and it returns 12/02/292269055.
I think it is because it is supposed to return both date and time. Let me
know if you want to format it to display both date and time.
Johnny
Did you try dateFormat()?
-Original
12 matches
Mail list logo