2个回答
展开全部
带时分秒的时间字段是指Timestamp类型的字段么?可以用CAST(XXXtimestamp AS DATE)函数来转换为Date类型,也可以反向转换:CAST(XXXdate AS TIMESTAMP)
e.g.
SELECT CAST(SYSTIMESTAMP AS DATE) AS AAA FROM DUAL
AAA
------------------------
2013-4-22 14:26:56
SELECT CAST(SYSDATE AS TIMESTAMP) AS AAA FROM DUAL
AAA
------------------------
22-4月 -13 02.23.55.000000 下午
e.g.
SELECT CAST(SYSTIMESTAMP AS DATE) AS AAA FROM DUAL
AAA
------------------------
2013-4-22 14:26:56
SELECT CAST(SYSDATE AS TIMESTAMP) AS AAA FROM DUAL
AAA
------------------------
22-4月 -13 02.23.55.000000 下午
2013-04-20
展开全部
转换成时间格式可以么? to_date(shijian,'yyyy/mm/dd hh24:mi:ss')
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询