Solved

convert char to date in oracle

Posted on 2011-03-14
3
735 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 73

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 76

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.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
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.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now