oracle - Date as number in sql -


when type current date in excel cell 08-may-2013 right click on cell , in format when click number category number

    date-08-may-13     formatted one-41402.00 

so there anyway can same number in sql

i tried using this.

    select to_char(sysdate,'j') dual 

but output 2456421

i understand julian value

but can me in getting output getting on excel i.e; 41402

the windows version of excel stores dates serial numbers. 01-jan-1900 1, 02-jan-1900 2, etc. mac version used use different starting date; don't know whether that's still case.

the essential data need in simple date arithmetic.

select current_date, current_date - date '1900-01-01' dual; 

that returns 41400.67037037037 current connection. rounding , adding 1 fenceposting return number you're looking for, i'd want test multiple time zones , such before i'd swear it.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -