Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mandg
 
Posts: n/a
Default Calculate current date from fixed time?


Is there a formula that I can use to calculate a date/time from a number
based on the fixed date of January 1, 1601?

If this sounds familiar to you, you'll know that I'm trying to convert
a large integer into a date/time format. In this case, I'm exporting
users from a domain controller and trying to view the LastLogonTime
variable that's only recorded as a large integer. If you're really
nerdy, here's the gist of the topic.

http://www.microsoft.com/technet/scr...lastlogon.mspx

Anyway, I've done enough of the calculations in Excel to convert the
variable into days. Now I just need to finish it by converting this
number into a date/time.

Say, for example: I have one instance calculated to 147851.966 days.
Now I need to determine what date/time this is based off of a January
01, 1601 start date.

Confusing enough?


--
mandg
------------------------------------------------------------------------
mandg's Profile: http://www.excelforum.com/member.php...o&userid=34986
View this thread: http://www.excelforum.com/showthread...hreadid=547264

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick
 
Posts: n/a
Default Calculate current date from fixed time?

No, not confusing: pretty easy, actually.

Subtract an constant value from your Long value: calc the value by using one example: if you know
what date time 147851.966 actually is, then it is easy.

For example

=147851.966 - 112345

formatted for date should show the correct date time - of course, change the 112345 to get the
correct date time. (if you had told us what the date time was, I would have calc'd it for you.....)

HTH,
Bernie
MS Excel MVP


"mandg" wrote in message
...

Is there a formula that I can use to calculate a date/time from a number
based on the fixed date of January 1, 1601?

If this sounds familiar to you, you'll know that I'm trying to convert
a large integer into a date/time format. In this case, I'm exporting
users from a domain controller and trying to view the LastLogonTime
variable that's only recorded as a large integer. If you're really
nerdy, here's the gist of the topic.

http://www.microsoft.com/technet/scr...lastlogon.mspx

Anyway, I've done enough of the calculations in Excel to convert the
variable into days. Now I just need to finish it by converting this
number into a date/time.

Say, for example: I have one instance calculated to 147851.966 days.
Now I need to determine what date/time this is based off of a January
01, 1601 start date.

Confusing enough?


--
mandg
------------------------------------------------------------------------
mandg's Profile: http://www.excelforum.com/member.php...o&userid=34986
View this thread: http://www.excelforum.com/showthread...hreadid=547264



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph
 
Posts: n/a
Default Calculate current date from fixed time?

"mandg" wrote in
message ...

Is there a formula that I can use to calculate a date/time from a number
based on the fixed date of January 1, 1601?

If this sounds familiar to you, you'll know that I'm trying to convert
a large integer into a date/time format. In this case, I'm exporting
users from a domain controller and trying to view the LastLogonTime
variable that's only recorded as a large integer. If you're really
nerdy, here's the gist of the topic.

http://www.microsoft.com/technet/scr...lastlogon.mspx

Anyway, I've done enough of the calculations in Excel to convert the
variable into days. Now I just need to finish it by converting this
number into a date/time.

Say, for example: I have one instance calculated to 147851.966 days.
Now I need to determine what date/time this is based off of a January
01, 1601 start date.

Confusing enough?


According to http://www.decimaltime.hynes.net/dates.html the offsets of Unix
time & Excel time differ by 109205 days. If you subtract that from your
147851.966 value you should get a date time in Excel terms (23:11:02 on
21/10/05).
--
David Biddulph


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining current Time Zone In Excel Shaun_C Excel Discussion (Misc queries) 2 April 7th 06 06:29 PM
How to show current date and time vsr_kmb New Users to Excel 3 March 28th 06 04:09 PM
How to calculate Date & Time differences robs Excel Worksheet Functions 2 October 4th 05 04:22 PM
date & time rob Excel Discussion (Misc queries) 1 September 19th 05 10:54 PM
How do I calculate if a date is in a certain time frame? Pe66les Excel Worksheet Functions 19 August 27th 05 11:07 PM


All times are GMT +1. The time now is 03:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"