会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
詺*篂
博客园
首页
新随笔
联系
管理
订阅
2013年4月12日
在sql中用于截取时间的方法
摘要: 一,截取的到的年月select convert(char(7),'2013-04-12 09:32:28.000',120);结果 2013-04select SUBSTRING(getdate(),0,8) ;二,截取到年月日select convert(varchar(10),getdate(),120);三,截取时间(HH:MM:SS)select convert(varchar(8),getdate(),108);
阅读全文
posted @ 2013-04-12 10:16 詺*篂
阅读(333)
评论(0)
推荐(0)
编辑
公告