Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Time Field

Author  Topic 

sunny_10
Yak Posting Veteran

72 Posts

Posted - 2014-03-16 : 10:00:58
Hi

I have one field Time(0) . If time is 7:29 (IST) in ms-access it shows same but in sql it stores as 19:29 . Why is it so . Secondly this does not show AM/PM in database

Thanks

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-03-16 : 13:36:24
quote:
Originally posted by sunny_10

Hi

I have one field Time(0) . If time is 7:29 (IST) in ms-access it shows same but in sql it stores as 19:29 . Why is it so . Secondly this does not show AM/PM in database

Thanks

what is the data type you are using? If you are using TIME, DATETIME or one of the other datetime types, the data is not stored as a string literal as you have indicated. What you are seeing is an artifact if the formatting or conversion to string. If that is not the desired format, you can convert it to any format you like using CONVERT function http://msdn.microsoft.com/en-us/library/ms187928.aspx
Go to Top of Page
   

- Advertisement -