Home » SQL & PL/SQL » SQL & PL/SQL » sysdate minus 6 hours
sysdate minus 6 hours [message #258785] Mon, 13 August 2007 10:17 Go to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
how do i achieve this .

i want to create a object like (sysdate -6 hours)..

how do i do it ?? plzz help
Re: sysdate minus 6 hours [message #258787 is a reply to message #258785] Mon, 13 August 2007 10:21 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What do you mean? Did you drop an object and now would like to fix what you've done, recreate the object and change its creation time?

Because, if it isn't your goal, I must admit that I don't understand the question.
Re: sysdate minus 6 hours [message #258789 is a reply to message #258787] Mon, 13 August 2007 10:22 Go to previous messageGo to next message
sanka_yanka
Messages: 184
Registered: October 2005
Location: Kolkata
Senior Member

Use this query:

SELECT SYSDATE -1/4 FROM DUAL;


Cheers
Sanka
Re: sysdate minus 6 hours [message #258790 is a reply to message #258785] Mon, 13 August 2007 10:27 Go to previous messageGo to next message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
Or to make it (hopefully) clearer
SELECT SYSDATE - (6/24) FROM DUAL;



icon14.gif  Re: sysdate minus 6 hours [message #258793 is a reply to message #258790] Mon, 13 August 2007 10:29 Go to previous messageGo to next message
sanka_yanka
Messages: 184
Registered: October 2005
Location: Kolkata
Senior Member

For More details see the link Date Function

Cheers
Sanka
Re: sysdate minus 6 hours [message #258795 is a reply to message #258785] Mon, 13 August 2007 10:32 Go to previous messageGo to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
Thnxx so much ..i m garteful 2 all
Re: sysdate minus 6 hours [message #258815 is a reply to message #258785] Mon, 13 August 2007 11:04 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
SQL> select sysdate, sysdate - interval '6' hour from dual;
SYSDATE             SYSDATE-INTERVAL'6'
------------------- -------------------
13/08/2007 18:04:31 13/08/2007 12:04:31

1 row selected.

Regards
Michel
Re: sysdate minus 6 hours [message #258861 is a reply to message #258787] Mon, 13 August 2007 12:07 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Littlefoot,
You and I aren't mind readers. Cool
Quote:
i want to create a object like (sysdate -6 hours)..

By
Vamsi
Re: sysdate minus 6 hours [message #258936 is a reply to message #258861] Mon, 13 August 2007 16:35 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Avril is Lavigne, Oracle database objects are tables, views, procedures, ... How do you call (just one of previous examples)
sysdate - 1/4
Is it an object? If so, what's its name?

True, I'm watching CSI Miami at the moment and don't have my mind strictly on Oracle so I might be terribly wrong, but ... will someone, please, throw some light on the issue? How did you discover that "hours" are "objects"?
Previous Topic: ISSUE
Next Topic: Transposing Hierarchical Data
Goto Forum:
  


Current Time: Tue Dec 03 11:16:21 CST 2024