Ramesh PAtel wrote:
>Hi All
>
>now Problem is
>
>I have to date From = '2003-04-01' and To='2003-05-12'
>now i want to use use date butween From and To.
>and each date one bye one use in query. so how to
>
>i increse date one bye one
>
>Please Help me.
>
>Ramesh Patel
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>
>
>
You may do this :
SELECT DATE (DATE '2003-04-01' + INTERVAL '24:00:00');
or build a PL/PGSQL function as this :
CREATE FUNCTION onedaymore(DATE) RETURNS DATE AS '
DECLARE
olddate ALIAS FOR $1;
newdate date;
BEGIN
newdate := olddate + INTERVAL ''24:00:00'';
RETURN
newdate;
END;
' LANGUAGE 'plpgsql';
--
Jean-Michel Chabanne
77450 MONTRY (FRANCE)
48" 54' N - 2" 49' E
Powered by Linux