Link to home
Start Free TrialLog in
Avatar of Steve Sperber
Steve SperberFlag for United States of America

asked on

How to make a Cell in Excel behave like a Date Field.

To sort by date in Excel or to export to MySQL, the data must be treated as a Date Field. Currently, it does not work for this file. 

Date_Field_ForSorting.csv

Avatar of Kimputer
Kimputer

Did you intend to keep it as a CSV file? In CSV files, there's no Date field option, as it's plain text. If you keep it in CSV, the program has to have the logic for properly reading the date.
If you want it in Excel, do this formatting only once (and obviously, save it in Excel format):

User generated image

Or if you really want it as CSV (because the import app only accepts that), try setting it to this format (yyyy-mm-dd), and save it back to CSV:

PLATE_ID,REPORT_DATE,REPORT_HOUR,AMOUNT
3685,2020-10-31,0,0.034
3685,2020-10-31,1,0.034
3685,2020-10-31,2,0.032
3685,2020-10-31,3,0.031
3685,2020-10-31,4,0.031

And then hope the import is smart enough to know this is really a date.
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Steve Sperber

ASKER

Resolved