From: Emils Klotins <emils@mail.usis.bkc.lv>
To: pgsql-sql@postgreSQL.org
Subject: date_part - multiple values in format?
Date: Thu, 2 Mar 2000 17:10:07 +0200
Message-ID: <200003021508.RAA08695@omega.bkc.lv> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Is there a way to format date according to a template or
anything like that?
Looked at the docs, didn't see anything (didn't see actually
anything much explaining how to get parts of date out)
appropriate.
I am looking basically for something like:
select date_part('%d %m %y', now()::datetime);
As I see it currently I can only do it with something like:
select ((date_part('day',now()::datetime) || date_part('month',
now()::datetime)) || date_part('year', now()::datetime);
which is, of course, rather clumsy.
This, btw, goes about concatenation, too.
Will there be a possibility of string concatenation in 7.x so that
I don't have to put all the concats in brackets? (ie. currently I
have to: ((((X || Y) || Z ) || A) || B)
which is of course also rather clumsy and leads to lots of
typos in case of more complex expressions.
Emils
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.2 -- QDPGP 2.61a
Comment: http://community.wow.net/grt/qdpgp.html
iQA/AwUBOL5nqt0sxa1MAPWHEQLEYwCfaJA+qlrYacC/cgcGOQ3rnTkGXu4AoIeK
B0aW+djoeiR0TVIp5J/elUZL
=AB97
-----END PGP SIGNATURE-----
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: emils@mail.usis.bkc.lv
Subject: Re: date_part - multiple values in format?
In-Reply-To: <200003021508.RAA08695@omega.bkc.lv>
References: <200003021508.RAA08695@omega.bkc.lv>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox