我想用SQL查询中插入一个datetime
价值为表(SQL Server)的下方SQL查询来插入日期时间在SQL Server
insert into table1(approvaldate)values(18-06-12 10:34:09 AM);
但我得到这个错误味精。 Incorrect syntax near '10'.
我试过用引号
insert into table1(approvaldate)values('18-06-12 10:34:09 AM');
我收到此错误信息Cannot convert varchar to datetime
请帮助! 谢谢。
谢谢。它的工作原理。顺便说一句,是不是可以输入DD-MM-YY格式? – Shee
@RichardTheKiwi'5'代表什么? – Shee
@Shee see footer to answer – RichardTheKiwi