Click here to Skip to main content
14,734,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,

i have a text file which is (|) delimited and it has nearly 1.5 lakh rows.

i need to import this text file to mysql using c#. the date time format is in the file
02/10/2014 16:24:47.
how i will get the date time format in mysql type like yyyy-MM-dd HH:mm:ss?. i tried with
datetimeformat=yyyy-mm-dd in the schema file but it's not working..

i created schema file
[file_name.txt]
colNameHeader=True
Format=Delimited(|)
MaxScanRows=0
col1= FName Text
col2=Op_Time DateTime
col3=LName Text
col4=TimeSpent Double
col5=Status Text
col6=Group Text
col7=R_Time DateTime
col8=Type Text
Posted
Updated 10-Aug-14 19:27pm
v2

1 solution

use function of MY sql

DATE_FORMAT(NOW(),'%W, %M %e, %Y @ %h:%i %p')

Sunday, September 20, 2008 @ 12:45 PM'

for more visit

http://davidwalsh.name/format-date-mysql-date_format
[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900