Avatar of Steve Sperber
Steve Sperber
Flag 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

Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Steve Sperber

8/22/2022 - Mon
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):



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
byundt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Steve Sperber

ASKER
Resolved
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23