sql server datetime

Posted by cvista on Stack Overflow See other posts from Stack Overflow or by cvista
Published on 2010-05-03T09:30:53Z Indexed on 2010/05/03 9:38 UTC
Read the original article Hit count: 278

Filed under:
|
|
|

hey

i have the following query:

select * from table where table.DateUpdated >='2010-05-03 08:31:13:000'

all the rows in the table being queried have the following DateUpdated:

2010-05-03 08:04:50.000

it returns all of the rows in the table - even though it should return none.

I am pretty sure this is because of some crappy date/time regional thing.

if i swap the date to be

select * from table where table.DateUpdated >='2010-03-05 08:31:13:000'

then it does as it should.

How can i force everything to be using the same settings? this is doing my head in :)

This is sql generated by NHIbernate from my WCF service if that matters.

w://

© Stack Overflow or respective owner

Related posts about sql

Related posts about nhibernate