Solved

convert char to date in oracle

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net - CSV to Oracle table 4 52
Maintaining Oracle Managed Accounts 2 30
Query Records that don't match 8 34
SQL Query 34 81
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 …
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

920 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

12 Experts available now in Live!

Get 1:1 Help Now