Solved

convert char to date in oracle

Posted on 2011-03-14
3
737 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.

Question has a verified solution.

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

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
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.

809 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