cast (date as int)??
what is the equivalent function of "cast (date as int)" from sqlserver to Oracle?
Just guessing - maybe something like (as I know almost nothing about SQL Server):
SELECT TO_NUMBER(TO_CHAR(:some_date, 'J')) FROM my_table;
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
in sqlserver the query cast('01/01/2005' as int) return 38382
i try ur query it returns 2453403.
I don't know how sqlserver calculate this date formel.
Looks like SQL Server is returning days since 01/01/1900, so I think you would just adjust for the difference between that and Julian Date base, e.g.
SELECT TO_NUMBER (TO_CHAR (:some_date, 'J')) - 2415021
Last edited by padders; 03-07-2005 at 06:24 AM.
Click Here to Expand Forum to Full Width