Received: from omega.bkc.lv (omega.bkc.lv [195.244.128.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA25747 for ; Thu, 2 Mar 2000 10:08:46 -0500 (EST) (envelope-from emils@mail.usis.bkc.lv) Received: from mail.usis.bkc.lv (mail.usis.bkc.lv [195.244.132.2]) by omega.bkc.lv (8.9.3/8.9.1) with ESMTP id RAA08695 for ; Thu, 2 Mar 2000 17:08:30 +0200 (EET) Message-Id: <200003021508.RAA08695@omega.bkc.lv> Received: from USIS-RIGA/SpoolDir by mail.usis.bkc.lv (Mercury 1.44); 2 Mar 100 17:10:55 EET Received: from SpoolDir by USIS-RIGA (Mercury 1.44); 2 Mar 100 17:10:31 EET From: "Emils Klotins" Organization: USIS Riga To: pgsql-sql@postgreSQL.org Date: Thu, 2 Mar 2000 17:10:07 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: date_part - multiple values in format? Priority: normal X-PM-Encryptor: QDPGP, 4 X-mailer: Pegasus Mail for Win32 (v3.12b) -----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-----