Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql import datetime YYYY-MM-DDThh:mm:ss.000000Z

Create table yourtable(
   id INT primary key AUTO_INCREMENT,
   start varchar(50)
);

INSERT INTO yourtable(start) VALUES('1901-02-03T05:30:00.000Z');

UPDATE yourtable
SET start = DATE_FORMAT(STR_TO_DATE(start,'%Y-%m-%dT%H:%i:%s.000Z'),'%Y-%m-%d %H:%i:%s');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql #import #datetime
ADD COMMENT
Topic
Name
4+3 =