I'm collecting data between two dates 01/12/2014 and 31/12/2014 but my data type is nvarchar.
Is my query right?
SELECT *
FROM customer
WHERE date >= CONVERT(datetime, '01/12/2014', 105)
AND date <= CONVERT(datetime, '31/12/2014', 105)
Result
Msg 242, Level 16, State 3, Line 1
The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.
Can anyone solve this problem?
Aucun commentaire:
Enregistrer un commentaire