架构.ini中的日期时间格式不匹配 [英] datetime format mismatch in schema .ini

查看:88
本文介绍了架构.ini中的日期时间格式不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



i有一个(|)分隔的文本文件,它有近1.5万行。



i需要使用c#将此文本文件导入mysql。日期时间格式在文件中

02/10/2014 16:24:47。

我将如何在mysql类型中获取日期时间格式,如 yyyy-MM-dd HH:mm:ss ?我在模式文件中尝试使用

datetimeformat = yyyy-mm-dd但是它不起作用..



i创建的模式文件

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

推荐答案

使用MY sql的功能



DATE_FORMAT(现在(),'%​​W,%M%e,%Y @%h:%i%p')



2008年9月20日星期日@ 12:45 PM'



更多访问



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

[ ^ ]


这篇关于架构.ini中的日期时间格式不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆