Best way to format date in a report for Excel?
I am looking to format a date in a report so Excel will pick it up as a date and apply "group filtering" to the column. Is there a way to make this happen?
These are things I've tried with no success.
DATE_FORMAT(w.START_DATE, '%m/%d/%Y') as SHIP_DATE,
DATE_FORMAT(w.START_DATE, '%m-%d-%Y') as SHIP_DATE,
DATE_FORMAT(w.START_DATE, '%m%d%Y') as SHIP_DATE,
DATE_FORMAT(w.START_DATE, '%Y/%m/%d') as SHIP_DATE,
DATE_FORMAT(w.START_DATE, '%Y-%m-%d') as SHIP_DATE,
DATE_FORMAT(w.START_DATE, '%Y-%d-%m') as SHIP_DATE,
Additionally, I ran into some funky things when trying to format the date, for example (these we're from the same computer):
DATE_FORMAT(w.START_DATE, '%Y-%m-%d') as SHIP_DATE
returns
09/25/2014 00:00:00
Another Example:
DATE_FORMAT(w.START_DATE,'%Y-%d-%m') as SHIP_DATE,
Returns
12/31/1969 19:00:00
Answers (0)
Be the first to answer this question