Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Need to get only date from date and time format

$
0
0
Hi All,

I need an urgent help. I am trying to fetch records where a certain date field <='31-May-13'. But I get ORA-0183 Not a valid month error. Please help me.

The Date Field is in the following format:
'MON DD YYYY HH12:MM:SS":000am"'
May 23 2013 12:00:00:000m
and I need to put a where condition like this date_field<='31-May-2013'

Query Used:

Select * from table_name
where uniq_key in ('abc','def') and fiscal_year=2013 and accounting_period=05
and to_char(to_date(rsv_fld_30,'MON DD YYYY HH12:MM:SS":000am"'),YYYYMMDD) <='20130531' --- gives me ORA:0183 Not a valid month error.

Kindly guide.

Thanks in advance

Viewing all articles
Browse latest Browse all 13329

Trending Articles