Invalid Date

Post Reply
abdnflmtz
Posts: 4
Joined: Thu May 20, 2021 1:57 pm

Invalid Date

Post by abdnflmtz »

Hello.. I have an issue with online graphing. So, I was trying to filter the CSV data in Excel so it will be a better data. But after you save it and try it graphing online, the web says "Invalid date detected: "05:19.8". Dates should be in the format: "YYYY-MM-DD hh:mm:ss.sss. Did you edit this file in Excel?". How can I solve this? Another fact is even if you dont do anything with the data in excel but you just save it, the message is still appear. I have change my date and time setting in the format as requested, it didn't do anyting.
Please help.

Regards, Mumtaz
User avatar
James
Site Admin
Posts: 1103
Joined: Wed Jan 02, 2013 9:06 pm

Re: Invalid Date

Post by James »

In the original file the timestamp has the full "year-month-day hour:minute:second.microsecond".
With Excel's defaults it saves over this with just the "hour:minute:second", wiping out most of the data, so you need the original file. There's no way to undo it, sorry.

If you want to make graphs in Excel, I would recommend doing "Save As" and saving it as a separate .XLSX file, then you will always have the clean original.
abdnflmtz
Posts: 4
Joined: Thu May 20, 2021 1:57 pm

Re: Invalid Date

Post by abdnflmtz »

So this is how I open the CSV file without comma separator (;) setting in my windows VS with comma separator (,) setting in my windows.
As you can see the file with (;) separator is showing full date and time template, whether the file with comma (,) separator is only showing time.
Any advice?

Thank you

NB : I don't do anything to the file just change the separator setting in my windows
Attachments
Screenshot (44).png
Screenshot (44).png (156.53 KiB) Viewed 1805 times
Screenshot (43).png
Screenshot (43).png (174.72 KiB) Viewed 1805 times
User avatar
James
Site Admin
Posts: 1103
Joined: Wed Jan 02, 2013 9:06 pm

Re: Invalid Date

Post by James »

If you want to see/preserve the full data time in Excel

* Open the original file
* Select the TimeStamp column
* Right Click and select "Format Cells"
* Under "Number" select "Custom"
* Enter "yyyy-mm-dd hh:mm:ss.000"

Note however, that you need to do this every time you open the CSV in Excel, as CSV files only store data and not formatting information.
MaverickNH
Posts: 2
Joined: Mon Feb 14, 2022 3:54 pm

Re: Invalid Date

Post by MaverickNH »

That works!

BRET
Post Reply