这是在SSMS中
我正在尝试插入以下虚拟测试语句及其失败的
INSERT INTO Client
(
[name],
[address],
[DOB],
[Mobile],
[Email],
[profession],
[refby]
)
VALUES
(
'Toby Keith',
'8 big dog daddy lane oklahoma 40518',
'28/06/2010',
'0424 280 185',
'tk@hotmail.com',
'Country Superstar',
'Willie'
)
我得到的信息是:
Msg 241, Level 16, State 1, Line 2
Conversion failed when converting date and/or time from character string.
现在我已经使用了很多次而没有问题我错过了什么小小的蠢事?
答案 0 :(得分:0)
使用ISO
日期时间格式 -
INSERT INTO Client
(
[name],
[address],
[DOB],
[Mobile],
[Email],
[profession],
[refby]
)
VALUES
(
'Toby Keith',
'8 big dog daddy lane oklahoma 40518',
'20100628',
'0424 280 185',
'tk@hotmail.com',
'Country Superstar',
'Willie'
)