How to add minutes to date? [message #436945] |
Tue, 29 December 2009 12:49  |
bella13
Messages: 90 Registered: July 2005
|
Member |
|
|
I am having trouble deriving the following. ANy clues/ help?
I want to add minutes to a date type.
To sysdate which is Dec 29 2009 1:00 PM I want to be able to add
- 10 minutes which should result output : Dec 29 2009 1:10 PM
- 90 minutes which should result output : Dec 29 2009 2:30 PM
- 1440 minutes which should result output : Dec 30 2009 1:00 PM
thanks,
|
|
|
|
|
|
Re: How to add minutes to date? [message #436961 is a reply to message #436958] |
Tue, 29 December 2009 23:45   |
Its_me_ved
Messages: 979 Registered: October 2009 Location: India
|
Senior Member |
|
|
How about this ?
We can do it with date arithmetic. The hint is already given.
hr@orafaq> select to_char(sysdate,'dd/mm/yyyy hh24:mi:ss') from dual;
TO_CHAR(SYSDATE,'DD
-------------------
30/12/2009 11:13:37
Elapsed: 00:00:00.00
hr@orafaq> select to_char(sysdate + 30/1440,'dd/mm/yyyy hh24:mi:ss') from dual;
TO_CHAR(SYSDATE+30/
-------------------
30/12/2009 11:43:53
Elapsed: 00:00:00.00
hr@orafaq>
[Updated on: Tue, 29 December 2009 23:48] Report message to a moderator
|
|
|
Re: How to add minutes to date? [message #436981 is a reply to message #436961] |
Wed, 30 December 2009 02:12  |
 |
Michel Cadot
Messages: 68767 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote:The hint is already given.
So let OP works by himself and come back if he has any problem.
No need to go against other posters; it is clear we want him to find it, isn't it?
Regards
Michel
|
|
|