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 2000 Forums
 Transact-SQL (2000)
 Stupid Date Time Question

Author  Topic 

Firemaple
Starting Member

14 Posts

Posted - 2007-07-12 : 15:51:32
Anytime i save a datetime or smalldatetime field it saves as "Jul 12 2007 2:50PM", is there a way to get the actual seconds also??

It's always the little things.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-07-12 : 15:55:42
I think the actual datetime value is stored there someplace. You are just using TEXT as result window and QA formats the time to the result you see. Try switching to GRID and try again.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Firemaple
Starting Member

14 Posts

Posted - 2007-07-12 : 16:02:09
Whenever i look in grid view (or return all rows in Enterprise manager) i get this format "2007-07-11 13:40:00."

Still no second value.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-07-12 : 16:04:35
well smalldatetiem doesn't store seconds.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-07-12 : 16:06:59
How could I miss that fact?
Good spotting Mladen!


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -