Re: Arrrr... date formatting.

From: "Reid Thompson" <Reid(dot)Thompson(at)ateb(dot)com>
To: <armtuk(at)gmail(dot)com>, "PostgreSQL List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Arrrr... date formatting.
Date: 2005-09-19 15:37:07
Message-ID: F71C0DC6B4FD3648815AAA7F969E35290194F5F2@sr002-2kexc.ateb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

provide an example of what you're trying to do.

test=> select date_part('month',current_date);
date_part
-----------
9
(1 row)

test=> select length(date_part('month',current_date));
length
--------
1
(1 row)



reid

-----Original Message-----
From: Alex Turner [mailto:armtuk(at)gmail(dot)com]
Sent: Monday, September 19, 2005 11:21 AM
To: PostgreSQL List
Subject: [GENERAL] Arrrr... date formatting.

Shiver me timbers, whats up with to_char()?!

Avast! Is there no way to get a month without it being padded to nine
characters? It makes using a database to actualy format a date for
output kinda impossible?

I'll have to walk the plank if I can't get an answer, the crew will
mutiny and leave me on an island with a one-shot pistol and the sight of
me sails dissapearing over the horizon!

Alex Turner
NetEconomist
P.S. For those who didn't know - it's national talk like a pirate day.

Browse pgsql-general by date

  From Date Subject
Next Message Lugovoi Nikolai 2005-09-19 15:45:09 Re: Arrrr... date formatting.
Previous Message Oleg 2005-09-19 15:23:33 problem with updateable view and constraint