Home » SQL & PL/SQL » SQL & PL/SQL » to get no. of days from 1900 to current date
to get no. of days from 1900 to current date [message #21692] Fri, 23 August 2002 02:49 Go to next message
meena
Messages: 36
Registered: December 2000
Member
Is a built in function to find no. of days from 1900 to current date in pro*c

Please help

Thanks in advance
meena
Re: to get no. of days from 1900 to current date [message #21697 is a reply to message #21692] Fri, 23 August 2002 06:21 Go to previous message
Venky
Messages: 52
Registered: October 2001
Member
select trunc(sysdate) - to_date('01-JAN-1900','DD-MON-RRRR') days from dual
SQL> /

DAYS
----------
37489

Trunc(sysdate) is required because depending upon server setting it may contain time component.
Previous Topic: select count(1)
Next Topic: Re: optimizing sql statement
Goto Forum:
  


Current Time: Wed May 08 10:01:14 CDT 2024