Excel dates - converting different date formats into a single format -
have large raw data dump , trying format dates consistent format.
as can see screenshot, there 2 main formats, 1 custom mm-dd-yyyy hh:mm am/pm , mm/dd/yyyy hh:mm:ss. 1 stored general, while other custom value.
i've tried =left(a2,8)
, converting via text()
, using text columns, can't bring values consistent value.
it appears windows regional settings short date dmy
or similar. data dump in mdy
format. why a2 , a4 being converted "real dates" (although incorrectly), , a3 not since excel not know month = 13. note a2 1-dec-2015 , suspect in original data 12-jan-2015.
edit: expand bit on explanation. when looks date or time entered excel cell, excel tries change result date, parsing input according windows regional short date format. has undesireable outcome. example, if windows format mdy date input dmy, input days <=12 converted incorrectly, , input days > 12 retained text. behavior cannot "turned off" , causes many complaints want enter data looks date, not. (for example, entering odds ratio 1-10 or 12:3 converted date or time)
several options
- change output of data have dates in
dmy
format. - instead of
open
ing data file,text import
. in later versions of excel, find ondata ribbon ► external data ► text
. open text import wizard , allow specifymdy
format of incoming data before excel transforms it.
after have done 1 of above, result "real" excel date or date/time , can format how like.
Comments
Post a Comment