Datetime data type field is not allowin 12:00:00 AM to be stored

  • Thread starter Thread starter Mike John
  • Start date Start date
M

Mike John

This is very weird !(Sql server 2000)

I am trying to store 11/18/2003 12:00:00 AM in a field
with data type datetime.

it accept it but the time disapper. So it looks like
11/18/2003.


however, 11/18/2003 12:00:01 AM works fine.

is there a bug in sql server 2000.

sincerely yours

mike john
 
Mike John said:
I am trying to store 11/18/2003 12:00:00 AM in a field
with data type datetime.

it accept it but the time disapper. So it looks like
11/18/2003.

"11/18/2003 12:00:00 AM" is the same as "11/18/2003", so the time part is
not displayed.

Jens.
 
Mike John said:
This is very weird !(Sql server 2000)

I am trying to store 11/18/2003 12:00:00 AM in a field
with data type datetime.

it accept it but the time disapper. So it looks like
11/18/2003.

however, 11/18/2003 12:00:01 AM works fine.

is there a bug in sql server 2000.

It allows it and it stores it - it just isn't printing the time part
when it happens to be 12am on the nose. I'm sure this is designed
behaviour - it's in no way losing any data, and if you're getting the
data into a .NET program you can easily format it differently yourself.
 
Back
Top