Home » SQL & PL/SQL » SQL & PL/SQL » how to findout diffrence between creation date and sysdate
how to findout diffrence between creation date and sysdate [message #195961] Tue, 03 October 2006 06:01 Go to next message
sibasankar
Messages: 7
Registered: September 2006
Location: Mumbai
Junior Member

Hi all,

Please help me to find out the diffrence between the creation date and sysdate.....

with warm regards,
shiva
Re: how to findout diffrence between creation date and sysdate [message #195962 is a reply to message #195961] Tue, 03 October 2006 06:08 Go to previous messageGo to next message
Cthulhu
Messages: 381
Registered: September 2006
Location: UK
Senior Member
What is creation date ? Is that a column on a table ? Is it stored in a DATE format ? If so, you would just do:

sysdate - creation_date

This gives you the number of days between the two. It won't be a whole number because of time components (if you want whole numbers, truncate both dates). You can obviously convert the figure to other units e.g. multiply by 24 to convert to hours.

This will definitely have to be moved to the Novices forum, I'm afraid.
Re: how to findout diffrence between creation date and sysdate [message #195963 is a reply to message #195961] Tue, 03 October 2006 06:09 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Creation date sounds like the date/time when an object was created, whereas sysdate is the current system date/time.
So at creation time the two equal. After that sysdate increases, creation date stays constant.

[Edit: busy moving, so you beat me Wink]

[Updated on: Tue, 03 October 2006 06:11]

Report message to a moderator

Re: how to findout diffrence between creation date and sysdate [message #196052 is a reply to message #195963] Tue, 03 October 2006 17:50 Go to previous messageGo to next message
William Robertson
Messages: 1640
Registered: August 2003
Location: London, UK
Senior Member
Surely Creation Date is Sunday 23 October 4004 BC Wink
Re: how to findout diffrence between creation date and sysdate [message #196061 is a reply to message #196052] Tue, 03 October 2006 23:07 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8632
Registered: November 2002
Location: California, USA
Senior Member
William Robertson wrote on Tue, 03 October 2006 15:50

Surely Creation Date is Sunday 23 October 4004 BC Wink


at nine o'clock in the morning
Re: how to findout diffrence between creation date and sysdate [message #196065 is a reply to message #196061] Wed, 04 October 2006 00:13 Go to previous messageGo to next message
Littlefoot
Messages: 20895
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
So you were there too??? It was too crowdy; that's the reason I didn't see you. Beautiful creation process, wasn't it?
Re: how to findout diffrence between creation date and sysdate [message #196069 is a reply to message #196065] Wed, 04 October 2006 00:52 Go to previous messageGo to next message
William Robertson
Messages: 1640
Registered: August 2003
Location: London, UK
Senior Member
Surely none of us got there until the Thursday?

SELECT TO_CHAR(TO_DATE('23-10-4004 BC','DD-MM-YYYY BC') +5,'Day DD Month YYYY BC') AS day_6
FROM   dual;

DAY_6
---------------------------
Thursday 28 October 4004 BC
Re: how to findout diffrence between creation date and sysdate [message #197919 is a reply to message #196069] Fri, 13 October 2006 04:52 Go to previous messageGo to next message
sibasankar
Messages: 7
Registered: September 2006
Location: Mumbai
Junior Member

hi all,

The creation date is basically a column and the requirement is that we need to find out the unapproved PO numbers from last date to sysdate with the time diffrence?


and thanks for the suggetions...?



with regards
shiva
Re: how to findout diffrence between creation date and sysdate [message #197920 is a reply to message #196069] Fri, 13 October 2006 04:54 Go to previous message
sibasankar
Messages: 7
Registered: September 2006
Location: Mumbai
Junior Member



Thanks willam for the query and looking for the same in future.

with regards,
shiva
Previous Topic: utl_file
Next Topic: Help Needed
Goto Forum:
  


Current Time: Mon Dec 05 20:59:24 CST 2016

Total time taken to generate the page: 0.06576 seconds