使用日期和时间执行查询 [英] Execute query with date and time

查看:118
本文介绍了使用日期和时间执行查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 请任何人知道,而不是告诉我我想在oracle中执行以下查询,查询日期和时间,但给出错误无效的月份,请任何人知道然后给出解决方案

查询:-从m_servicemaster中选择*,其中to_date(srm_enter_date)>''2011年9月19日3:42:28 PM''

第1行出现错误:
ORA-01843:无效的月份

Hi please anybody know than tell me i want to execute below query in oracle with date and specific with time but give error not valid month please any body know then give solution

Query:-select * from m_servicemaster where to_date(srm_enter_date) >''9/19/2011 3:42:28 PM''

ERROR at line 1:
ORA-01843: not a valid month

推荐答案

使用此
select * from m_servicemaster where srm_enter_date > to_Date('09/19/2011 03:42:28 PM',"MM/DD/YYYY HH:MI:SS AM");


这篇关于使用日期和时间执行查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆