Perfect. Thanks a lot
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Tom Lane
Sent: 27 March 2004 01:03
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [SQL] date_part stored procs
"Tsoloane Moahloli" <[EMAIL PROTECTED]> writes:
> SELECT INTO len * FROM (SELECT
> ((date_part(''year'',age(docDate))*12)+(date_part(''month'',age(docDate
> AS a;
> The problem is that it does not run and I cannot for the life of me tell
> why.
I think you miscounted parentheses.
Rudi,
select to_char(date_column, 'Month');
See similar under "Formatting Function" in the docs.
--
-Josh Berkus
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PR
"Salvador Mainé" wrote:
>
> Hello:
>
> I'm using postgres 7.0.2. When I use date_part('day', date) sometimes I
> get wrong values. Ie:
> and date_part('day', '1999-3-28')=27
>
> and date_part('day', '2000-3-26')=25
>
> Is it a bug? Is there any SQL equivalent function?
I remember some issues