如何将日期格式转换为timestamp

forever003 2007-01-23 09:49:54
在DB2数据库中存储时间的时间格式是timestamp,我的SQL语句为:select * from dcontact where proctime between startime and endtime;startime和endtime是20070123格式的,怎转化成timestamp格式的,请高手赐教!!!
...全文
1055 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ancky_zhang 2008-09-12
  • 打赏
  • 举报
回复
lz 是什么意思??
meiZiNick 2008-05-01
  • 打赏
  • 举报
回复
不明LZ在说什么
knowledge_Is_Life 2008-04-30
  • 打赏
  • 举报
回复
有问题请先GOOGLE,BAIDU
shazi_pig 2007-02-01
  • 打赏
  • 举报
回复
db2 => select *from dcontact where date(proctime) between date(substr(startime ,1,4
)||'-'||substr(startime ,5,2)||'-'||substr(startime ,7,2)) and date(substr(endtime,1,4
)||'-'||substr(endtime,5,2)||'-'||substr(endtime,7,2))
cysh 2007-01-29
  • 打赏
  • 举报
回复
最后6位296000是微秒
forever003 2007-01-23
  • 打赏
  • 举报
回复
还有,我的表中timestamp是'2007-01-22 14:48:18.296000'格式的,请问最后6位296000是什么?

5,891

社区成员

发帖
与我相关
我的任务
社区描述
IBM DB2 是美国IBM公司开发的一套关系型数据库管理系统,它主要的运行环境为UNIX(包括IBM自家的AIX)、Linux、IBM i(旧称OS/400)、z/OS,以及Windows服务器版本
社区管理员
  • DB2
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧