Supported Date format for Loading Data?


#1

Dear all,

I am trying to load the Data with following Date format
01-04-2018 23:43:00 (DD-MM-YYYY HH24:MI:SS)

However not able to load the Data…When checking Flights sample Dat observed that Date format is
2008-01-03 09:26:00 (YYYY-MM-DD HH24:MI:SS)

Please let us know is it possible to load data in this format (01-04-2018 23:43:00) or need to transform Date data in this format (2008-01-03 09:26:00)

Kindly advise.

/sumit


#2

you can see the officially supported dates/ts formats here

http://docs.mapd.com/latest/5_dml.html

besides that, the copy command accepts other formarts while loading timestamp

so yyyy-mm-dd hh24:mi:ss and dd/mm/yyyy hh24:mi:ss are accepted
; unexpectdly the dd-mm–yyyy hh24:mi:ss is rejected when dealing with timestamp and accepted bus misinterpreted for a DATE.

so i guess at the moment you have to change the date format; it wouldn’t be difficult to reprocess the file with a regex like that

sed -e “s/([0-9]{2})-([0][0-9]|[1][0-2])-([0-9]{4})/\1\/\2\/\3/”


#3

thanks @aznable for feedback