Ask Your Question
0

Time Stamp Help!

asked 2017-05-21 20:00:49 +0200

updated 2017-05-21 20:01:08 +0200

Team, Wrote a C++ program that outputs a CSV with the following timestamp format. How can I get Calc to recognize this so that I can sort ascending and descending? I have thousands of entries and a customer who needs it in order. Any ideas?

Wed May 31 23:00:00 2017

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-05-21 21:09:14 +0200

Lupp gravatar image

updated 2017-05-21 21:54:03 +0200

A timestamp format like "DDD MMM DD HH:MM:SS YYYY" should be regarded either a bad joke or a criminal offense. Who wrote that monstrous "program"? Did he manage to get that program doing anything in a reasonable way?

And now we get that question giving exactly one example, and this eaxmple is based on exactly the one month for which the month-formats MMM and MMMM don't make a difference.

Can I believe that at least a format was chosen resulting in a constant length of all the stamps?

Suppose the import format is actually described by DDD MMM DD HH:MM:SS YYYY and an imported DTS is placed in cell A2 you will get a date-time-stamp in the numeric representation used by spreadsheets by the simple formula:
=DATE(VALUE(MID(A2;21;4));(FIND(MID(A2;5;3);"JanFebMarAprMayJunJulAugSepOctNovDec")+2)/3;VALUE(MID(A2;9;2)))+TIME(VALUE(MID(A2;12;2));VALUE(MID(A2;15;2));VALUE(MID(A2;18;2)))
You should format the result by YYYY-MM-DD HH:MM:SS to get an unambiguos display.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-05-21 20:00:49 +0200

Seen: 374 times

Last updated: May 21 '17