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
 SQL Server Development (2000)
 select CAST(getdate() AS SMALLDATETIME)

Author  Topic 

SamC
White Water Yakist

3467 Posts

Posted - 2005-03-24 : 14:49:41
How come

select CAST(getdate() AS SMALLDATETIME)

Always returns a time to the nearest minute, seconds are always zero?

Sam

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-24 : 14:52:52
because smalldatetime is precise to the minute?

Go with the flow & have fun! Else fight the flow
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2005-03-24 : 15:01:48
Overlooked the obvious again. I'd believed SMALLDATETIME had a significance of seconds for years.

Sam
Go to Top of Page
   

- Advertisement -