Solved

convert char to date in oracle

Posted on 2011-03-14
3
739 Views
Last Modified: 2012-05-11
There is an old oracle audit table in oracle that has data for a date in varchar format
The value is stored as 01/20/2011 00:00
Now I want to take this column as date. The column name is old_value
Table is campaign_donors_audit.
0
Comment
Question by:anumoses
3 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 250 total points
ID: 35130237
select to_date(old_value,'mm/dd/yyyy hh24:mi') from campaign_donors_audit
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35130238
just use to_date:

to_date(old_value,'MM/DD/YYYY HH24:MI')
0
 
LVL 4

Expert Comment

by:subratabiswas
ID: 35130264
select to_date('01/20/2011 00:00', 'mm-dd-rrrr HH24:MI') from dual for your example
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question