Hi,
I have a problem converting numbers in my excel sheet to dates with corresponding hours and minutes.
Any help would be appreciated
I've attached a sample.
Best regards
Hi,
I have a problem converting numbers in my excel sheet to dates with corresponding hours and minutes.
Any help would be appreciated
I've attached a sample.
Best regards
And what dates and times are you expecting to get, and why?
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
You have given not one example of what you are looking to achieve ...
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Based on what I learned in this thread: https://www.excelforum.com/excel-for...ml#post5426932 these look like "seconds since Jan 1 1970" time stamps. Assuming that is the case, I tried a similar formula as I proposed in the other thread =CONVERT(timestamp,"sec","day")+DATE(1970,1,1) and I get a bunch of morning of 4 Jan 2021 timestamps.
That's my guess. If I guessed wrong, help us understand exactly what these timestamps represent and we should be able to help convert them into Excel's date/time serial number system (days since 0 Jan 1900).
Edit to add: with this assumption, 4 digits past the decimal point implies that the timestamps are to the nearest tenth of a millisecond. I seem to recall trying to format times beyond the nearest millisecond and Excel would not do it (I don't have Excel to test on right now) -- hh:mm:ss.000 was a valid number format, but hh:mm:ss.0000 was not. Can anyone with Excel handy double check?
Last edited by MrShorty; 03-20-2021 at 09:42 AM.
Originally Posted by shg
That worked! Thank you very much, Mrshorty
Sorry for not explaining the problem too well.
Got handed an excel sheet and did not have a lot to work with - kind of like you guys.
Anyways, I believe that did the trick.
Best
ExcelNick
Sorry for short explanation, had little to work with myself..
But MrShorty solved the problem further down the thread!
Thank you anyways
For completeness, I went ahead and tested in my older version of Excel, and confirmed that (my version) of Excel cannot display fractions of a millisecond as part of a date/time format. I note that LO Calc is not limited to milliseconds, but can display any fraction of a second (though one is eventually limited to 15 digits of double precision in the underlying serial number value).
If you are not worried about anything past the nearest millisecond, then the solution as provided should work fine. If you ever need to be concerned with those last two digits (and the possible floating point errors in those last one to two digits), you may need to look into this a little further.
It is sufficient, thank you!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks