November 27th, 2003, 09:26 AM
in SQLServer 2000 as part of a Select statement I have:
(CONVERT(char(11), dbo.Submission.GatewayTimestamp, 103) > '13/05/2001')
in my Where clause.
The GatewayTimestamp column is of type datetime.
Why do I have returned records where the date is '24/04/2001' as well as Records > than my date specified?
November 27th, 2003, 09:48 AM
That's because you are comparing strings and not dates. '2' is larger than '1'
where dbo.Submission.GatewayTimestamp > '2001-05-13'
November 27th, 2003, 10:16 AM
Just specifying the column, gives me an out of range error
November 27th, 2003, 11:54 AM
Could you post the query you used and the exact error message.