Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Difference between storing sysdate and to_date(to_char(sysdate, 'DD Mon YYY

user8765044Sep 22 2012 — edited Sep 22 2012
What is the difference between storing sysdate or to_date(to_char(sysdate, 'DD Mon YYYY HH:MI AM'),'DD Mon YYYY HH:MI AM') in a date data type column?

When I column value is set with sysdate the following query gives no records
select *
from Test
WHERE Updatedon = to_date('22 Sep 2012 07:55 PM','DD Mon YYYY HH:MI AM');

when I run the same query with out where clause I am getting the records with that time or storing with to_date(to_char(sysdate, 'DD Mon YYYY HH:MI AM'),'DD Mon YYYY HH:MI AM') gives records.

Can someone explain the difference please?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2012
Added on Sep 22 2012
4 comments
3,164 views