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!

Convert Date to Excel DateValue

SeshuGiriAug 26 2014 — edited Aug 26 2014

I am using this to convert date to excel datevalue, is there a simple way to do this?

select to_date('31/12/2013', 'dd/mm/yyyy') normal_date,

    (trunc(to_date('31/12/2013', 'dd/mm/yyyy')) + CASE

  WHEN trunc(sysdate) >= to_date('01/01/1900', 'dd/mm/yyyy') then

   1

  else

   0

    end) - (to_date('01-01-1900', 'DD-MM-YYYY') - 1) excel_date

   from dual;

Source: https://community.oracle.com/thread/1127089?tstart=0

This post has been answered by Frank Kulash on Aug 26 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 23 2014
Added on Aug 26 2014
3 comments
1,743 views