select convert(varchar,getdate(),23) 只截取系统当前日期
select convert(varchar,getdate(),8) 只截取系统当前时间
select convert(varchar,getdate(),8) 只截取系统当前时间
本文介绍了使用SQL语句截取系统当前日期与时间的方法。通过两种不同的格式化选项,可以轻松实现仅获取日期或仅获取时间的需求。这对于进行时间戳的标准化处理非常有用。
367
900

被折叠的 条评论
为什么被折叠?