Hi all,
Im loading some data into a MySQL db v 3.23.55 on winNT box, from a .csv file using LOAD DATA INFILE.
Everything is working perfect, except for trying to get my last column in the table, which is a Timestamp(14) column, to display the timestamp for which the data was loaded. All Zero's (0) are being displayed.
According to the MySQL site
[quote]
TIMESTAMP columns are set to the current date and time only if there is a NULL value for the column (that is, \N), or (for the first TIMESTAMP column only) if the TIMESTAMP column is omitted from the field list when a field list is specified.
[\quote]
So, I am loading the last cell value as a null or "". I've also tried "\n" which doesn't work either. The last cell value in the .csv should correspond to my last MySQL timestamp column type. I just can't seem to get anything but 0's to be displayed in mysql.
Any ideas?
Thanks.
LOAD DATA INFILE & Timestamp Question
Moderator: General Moderators
ok...i've found the issue.
i forgot a date character for seconds (for the .cvs data in the cell corresponding to the timestamp column):
now it works
i forgot a date character for seconds (for the .cvs data in the cell corresponding to the timestamp column):
Code: Select all
//had
date("YmdHi");
//revised
date("YmdHis");
?>now it works