converting to Day, Date, Time from a 13 digit integer

nitebyfly

New Member
Joined
Mar 12, 2011
Messages
12
I have a data set that has, for example, 1288865380025 as the cell readout, but is coded as 1.28886E+12. How do you convert this number to Day, Date, Time?

Thanks
 
Just a thought with the 4 hour difference, is daylight savings time (or local equivilant) a factor that needs to be considered?
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Yes, it is. Thank you for pointing that out. I went back and checked and at least for here in Florida, there would be a difference of -5 hours or -4 hours. Is there a way to include that in the original formula?

Thanks again,

Tim
 
Upvote 0
It can, but I don't think easily.

I'll see if I can come up with something, but hopefully barry will have a swift solution :)
 
Upvote 0
Well, the rules for daylight saving have changed over the years so it depends on the date ranges of your data - are you looking at just "current" and future dates, e.g. 2010 onwards or do you need to include historical data?

If it's the latter then you probably need to construct a lookup table with historical daylight savings times, if the former then you could also use a lookup table or include some additional logic in the formula......
 
Upvote 0
You can simplify the formula solution a little, modifying my suggestion here

So if you have the original data in A2 then you can use this formula in B2 to convert to GMT/UTC

=A2/86400000+DATE(1970,1,1)

then you can do a further conversion in C2 to convert to EST, taking into account daylight saving time with the current rules

=B2-LOOKUP(B2,DATE(YEAR(B2),{1,3,11},{1,15,8})-WEEKDAY(DATE(YEAR(B2),{1,3,11},7))+{0,7,6}/24,{5,4,5})/24

As the current rules (in the US) came into effect from 2007 that would be valid for all data from 2007 and into the future (until the rules change again).
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,275
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top