Offline
Hi all,
I need help to understand how I convert the Utc value in the CSV log file, I use excel for the analysis. A typical format is like below. 45059.344034
Thanks.
/JonasLSWE
Offline
It is a Microsoft DATE type, so is native to Excel etc.
You can just select the format of the cells in Excel.
Offline
Thanks for quick reply as always. I have tried all pre defined formats.... without any success. Pls advice which I should use.
Offline
I use the custom setting d/mm/yyyy h:mm:ss.
It's a custom setting. To get to it: Home tab -> Number -> "More Number Formats" (opens "Format Cells" Box) -> Custom -> then type d/mm/yyyy h:mm:ss (alternatively scroll down the options to d/mm/yyyy h:mm then add ":ss"). Hopefully that is what you want!
If you ever want to convert from UTC to your local time (I do this in a column to the far right so as not to muck up the log file), add your decimal time format to (the number of hours you are different from UTC/24), eg for Sydney outside daylight savings its 45059.344034 + (10/24). If you are 10 hours behind UTC, obviously its 45059.344034 + (-10/24)
Offline
For those going from Expedition to Unix in Python:
msDate = float(vals["Utc"]) # Expedition's Microsoft DATE like 45059.344034
seconds = int((msDate - 25569) * 86400)
ts = datetime.datetime.utcfromtimestamp(seconds)