我们要以什么格式在数据库中输入日期? [英] in what format we want to enter date in database?

查看:206
本文介绍了我们要以什么格式在数据库中输入日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将日期存储在数据库中...但是我要插入的日期没有存储..因为我是初学者,我无法找出问题所在...您能帮上忙吗? ?

i want to store the date in database...but the date which i''m inserting is not storing..since i''m beginner i cant able to found out wats the problem...can yu help??

推荐答案

始终将日期存储为DateTime值.只需在需要在输出设备上显示它时对其进行格式化.
Always store dates as DateTime values. You only ever need to format it when you need to display it on an output device.


亲爱的Gopinath,

请使用一些Google google [ http://weblogs.sqlteam.com/jeffs/archive/2007/08/29/SQL-Dates-and-Times.aspx [ http://msdn.microsoft.com/en-us/library/ms187819.aspx [ ^ ]

http://www.informit.com/library/content.aspx?b=STY_Sql_24hours& seqNum = 93 [ ^ ]

http://databases.about.com/od/sqlserver/a/date_time.htm [ ^ ]

谢谢
Dear Gopinath,

Please do some google google[^]search also dear friend.

The below links might help you out.

http://weblogs.sqlteam.com/jeffs/archive/2007/08/29/SQL-Dates-and-Times.aspx[^]

http://msdn.microsoft.com/en-us/library/ms187819.aspx[^]

http://www.informit.com/library/content.aspx?b=STY_Sql_24hours&seqNum=93[^]

http://databases.about.com/od/sqlserver/a/date_time.htm[^]

Thanks


yyyy-mm-dd hh:mm:ss:mmm .....



终于做到了...
yyyy-mm-dd hh:mm:ss:mmm.....



finally made it...


这篇关于我们要以什么格式在数据库中输入日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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