Ora Date format [message #3039] |
Sun, 01 September 2002 22:15 |
Johnny
Messages: 15 Registered: October 2000
|
Junior Member |
|
|
Hi,
I want to subtract Time(only) from Date(DateTime) and convert the result to date format. My experiments are getting me nowhere. Is there any shortcut to do this?
|
|
|
Re: Ora Date format [message #3040 is a reply to message #3039] |
Sun, 01 September 2002 22:47 |
Manoj
Messages: 101 Registered: August 2000
|
Senior Member |
|
|
to substract time i.e take of the time part from the DateTime, you can use a 'substr' string to extract the date from the field
for ex. to get the date from date time field which looks like '22-MAR-2002 10:22:12' use substr(datetime,1,11) = which gives the date part. then use to date function to convert the date part into date format.
hope it helps. if it did not work, then post in the web that it did not work and i'll can say something else
|
|
|
Re: Ora Date format [message #3045 is a reply to message #3039] |
Mon, 02 September 2002 00:49 |
Johnny
Messages: 15 Registered: October 2000
|
Junior Member |
|
|
hi Manoj,
I changed the time col to number and it worked fine. Thank you for the reply.
have a great day.
Johnny
|
|
|