Muhyiddin A.M Hayat wrote:
Ok, thanks
But if i would like to display date in one Month,
e.g :
date in feb 2005
You can do that in Pg date arithmetic:
# select '1 oct 2004'::date + '1 month'::interval - '1 day'::interval;
?column?
-
2004-10-31 00:00:00
(1 row)
# selec
On Wed, Feb 02, 2005 at 10:53:09AM +0800, Muhyiddin A.M Hayat wrote:
>
> But if i would like to display date in one Month,
You could use the given function with a few changes. For example,
given an arbitrary date, you could use date_trunc() to find the
first day of that date's month, add an inte
You might need to get creative and do some functionality in another language, like C or PHP via the PL integration. (I know I just saw something for PHP . . . the question is can you use PHP functions ? ? )
On Feb 1, 2005, at 8:53 PM, Muhyiddin A.M Hayat wrote:
Ok, thanks
But if i would li
: pgsql-sql@postgresql.org
Sent: Friday, January 28, 2005 11:46
PM
Subject: Re: [SQL] Calendar
Function
maybe somthing like this:CREATE OR REPLACE FUNCTION
calendar (DATE, DATE) RETURNS SETOF DATE LANGUAGE 'plpgsql' AS
'DECLARE v_from ALIAS FOR $1;
v_to ALIAS FOR $
maybe somthing like this:
CREATE OR REPLACE FUNCTION calendar (DATE, DATE) RETURNS SETOF DATE
LANGUAGE 'plpgsql' AS '
DECLARE
v_from ALIAS FOR $1;
v_to ALIAS FOR $2;
v_current DATE DEFAULT v_from;
BEGIN
WHILE (v_current<=v_to) LOOP
RETURN NEXT v_current;
v_curr
Dear All,
How to create Calendar Function or Query. I would
like to display date form -mm-dd to -mm-dd or display date in one
Month
e.g:
date 2005-01-01 2005-01-02 2005-01-03 2005-01-04 2005-01-05 2005-01-06 2005-01-07 2005-01-08 2005-01-09 2005-01-10 2005-01-11