[英]Using date and time to create datetime
I want to print using a select query. 我想使用选择查询进行打印。
SQL Server allows you to add two datetime
values. SQL Server允许您添加两个datetime
值。 So: 所以:
select cast(createDate as datetime) + cast(createTime as datetime)
Unfortunately, you cannot add a time
to a date
. 不幸的是,您不能在date
添加time
。 But the type conversion is simple enough. 但是类型转换很简单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.