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)
 SQL 2000 Date Time Issue

Author  Topic 

otto
Starting Member

21 Posts

Posted - 2001-04-30 : 16:37:39
I have a strange problem with SQL 2000. I've tried with both SmallDateTime and DateTime fields.

I want to insert '4/30/2001 12:00:00' AM into a field. Every time I try this, SQL truncates the TIME portion of the data and leaves me with '4/30/2001'. I must have the time portion of the date in the field.

According to the SQL on-line books says that the field should default to 12 AM. Okay, so if that is the case, I should be able to run a query and get that day. Doesn't work.

If the date field is SmallDateTime, I can enter 4/30/2001 12:01:00 AM. But not, 4/30/2001 12:00:01 AM (but I can insert this into a DateTime field).

I'm not sure what to think here. Anyone have ideas?

Thanks in advance,

Otto
   

- Advertisement -