jeudi 23 juin 2016

Input date value in sql

I want to update my promotion table, like :

update [promotion]

set DateStart='2016.06.24 08:00:00', 

DateEnd='2017.07.10 10:00:00',

TimeStart1='2016.06.24 18:00:00',

TimeEnd1='2017.10.10 12:00:00',

TimeStart2='2016.10.02 411:00:00',

TimeEnd2='2017.12.25 15:00:00'

where PromotionName='40%Off';


And it result with error message bellow :

Msg 242, Level 16, State 3, Line 1
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
The statement has been terminated.

Can we input date in sql ?

Aucun commentaire:

Enregistrer un commentaire