This is a discussion on Adding days in Oracle 8.1.x within the Oracle Database forums, part of the Database Server Software category; --> Hallo! Can someone tell me please how to add days to a given date in Oracle 8? I'm checked ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Hi! The following statement seems to work: select to_date('31.10.2003','DD MM YYYY')+1 from dual; In my environment I will replace the 31.10.2003 with a variable. Is this way of doing it ok, or are there alternatives? Thanks Tom |
| |||
| If the column is a date then just +1 to add 1 day. eg select myDate+1 from mytab ... Jim "Tom Miskiewicz" <miskiewicz2@yahoo.com> wrote in message news:bneind$2is$1@news.gatel.net... > Hi! > > The following statement seems to work: > > select to_date('31.10.2003','DD MM YYYY')+1 from dual; > > In my environment I will replace the 31.10.2003 with a variable. Is this way > of doing it ok, or are there alternatives? > > > Thanks > Tom > > |
| ||||
| That is it. Just add 1 to any date datatype and you get the next day. FYI.. there are several functions for dates for things like adding months, rounding, truncating, etc... For more info on Oracle8i, see docs at: http://download-east.oracle.com/docs...ion.htm#998166 "Tom Miskiewicz" <miskiewicz2@yahoo.com> wrote in message news:bneind$2is$1@news.gatel.net... > Hi! > > The following statement seems to work: > > select to_date('31.10.2003','DD MM YYYY')+1 from dual; > > In my environment I will replace the 31.10.2003 with a variable. Is this way > of doing it ok, or are there alternatives? > > > Thanks > Tom > > |