Skip to content
Advertisement

select smalldatetime between two strings

What am I doing wrong ?

enter image description here

Desired Output: Column InRange should contain YES for two last rows.

Advertisement

Answer

Try specifying ISO format dates, more than likely your regional settings are having an effect.

If you use YYYYMMDD there is no ambiguity. The following works fine:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement