dba123
asked on
AND ((cs.dtDateCreated >= '2007-11-07 00:00:00.000' AND cs.dtDateCreated <= '2008-01-15 00:00:00.000' + 1)
I assume I need to cast?
AND ((cs.DateCreated >= '2007-11-07 00:00:00.000' AND cs.DateCreated <= '2008-01-15 00:00:00.000' + 1)
AND ((cs.DateCreated >= '2007-11-07 00:00:00.000' AND cs.DateCreated <= '2008-01-15 00:00:00.000' + 1)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
got it to work this way as well
AND ((cs.DateCreated >= CAST('2007-11-07 00:00:00.000' as varchar) AND cs.DateCreated <= CAST('2008-01-15 00:00:00.000' AS varchar))
AND ((cs.DateCreated >= CAST('2007-11-07 00:00:00.000' as varchar) AND cs.DateCreated <= CAST('2008-01-15 00:00:00.000' AS varchar))
>got it to work this way as well
this might work, but it is using implicit conversion format.
you should prefer the explicit way I suggested, it will save you from unexpected trouble you could get into later... on other servers ... etc...
this might work, but it is using implicit conversion format.
you should prefer the explicit way I suggested, it will save you from unexpected trouble you could get into later... on other servers ... etc...
ASKER