上午或下午时间检查c#winform [英] am or pm time check in c# winform
问题描述
你好
i有些疑惑
1-can我只有时间字段或者MS SQL SERVER 2005中的日期字段,,,我看到的是datetime并且没有更改的东西吗?
2-我有时间让我们说02 :23我怎么知道这个时间是上午或下午???
愚蠢的但是心里想要
thanx很多
hi there
i have some doubts which are
1-can i have only time field or date field in MS SQL SERVER 2005 ,,,all i see is datetime and there is no fromat to change ?
2- i have a time let say "02:23" how can i know that this tim is am or pm ???
stupid ones but mind is asking
thanx alot
推荐答案
SQL 2005没有DATE格式,只有约会时间。我认为可能是SQL 2012具有日期格式。但是,您在数据库中存储的内容当天为0,这取决于您的COLLATION可能是1/1/1900然后存储时间。时间以24小时格式存储,因此下午1:00是13:00。
显示和格式化日期和时间是通过您的程序处理的,但是作为日期时间存储在数据库中。
SQL 2005 does not have a DATE format, only DateTime. I think it may be SQL 2012 that has a date format. However, what you'll store in the database is 0 for the day, which depending on your COLLATION may be 1/1/1900 and then store the time. The time is stored in 24 hour format so 1:00 PM is 13:00.
The displaying and formatting of the date and time is handled through your program but is stored as datetime in the db.
SQL 2005没有DATE格式,仅约会时间。我认为可能是SQL 2012具有日期格式。但是,您在数据库中存储的内容当天为0,这取决于您的COLLATION可能是1/1/1900然后存储时间
SQL 2005 does not have a DATE format, only DateTime. I think it may be SQL 2012 that has a date format. However, what you'll store in the database is 0 for the day, which depending on your COLLATION may be 1/1/1900 and then store the time
aha我得到它
但第二个问题
aha i got it
but the 2nd ques
时间以24小时格式存储,因此下午1:00是13:00。
The time is stored in 24 hour format so 1:00 PM is 13:00.
蒂姆未存储在pm或am
i想写上午和下午?
我该怎么做?
the tim is not stored in pm or am
i want to write am and pm ?
how can i do that ?
这篇关于上午或下午时间检查c#winform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!