X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 74E0C9DCD83 for ; Thu, 8 Dec 2005 14:13:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59504-04 for ; Thu, 8 Dec 2005 14:13:01 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ll.mit.edu (LLMAIL.LL.MIT.EDU [129.55.12.40]) by postgresql.org (Postfix) with ESMTP id CD8C49DCB83 for ; Thu, 8 Dec 2005 14:12:59 -0400 (AST) Received: (from smtp@localhost) by ll.mit.edu (8.12.10/8.8.8) id jB8ICxnV003294 for ; Thu, 8 Dec 2005 13:12:59 -0500 (EST) Received: from UNKNOWN( ), claiming to be "[155.34.198.117]" via SMTP by llmail, id smtpdAAATdaiDf; Thu Dec 8 13:12:41 2005 Message-ID: <43987799.3000401@ll.mit.edu> Date: Thu, 08 Dec 2005 13:12:41 -0500 From: David Rysdam User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.11) Gecko/20050729 X-Accept-Language: en-us, en MIME-Version: 1.0 CC: pgsql-general@postgresql.org Subject: Re: date format References: <439870FF.4080002@ll.mit.edu> <43987540.1050709@ll.mit.edu> In-Reply-To: <43987540.1050709@ll.mit.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.132 required=5 tests=[AWL=-0.057, MISSING_HEADERS=0.189] X-Spam-Score: 0.132 X-Spam-Level: X-Archive-Number: 200512/451 X-Sequence-Number: 88014 David Rysdam wrote: > David Rysdam wrote: > >> I could swear (but I don't think I can prove at this point) that 8.0 >> beta3 returned timestamps with milliseconds, like this: >> >> YYYY-MM-DD HH24:MI:SS.MS >> >> But 8.1 isn't doing that. I see functions to format the date, but >> that would require me to change all my existing SQL to specifically >> ask for the milliseconds. There's also the "set datestyle" thing, >> but the granularity doesn't exist to specify an exact format such as >> the above. Is there a way to tell postgres *exactly* what I want the >> *default* date output format to be? >> >> ---------------------------(end of broadcast)--------------------------- >> TIP 4: Have you searched our list archives? >> >> http://archives.postgresql.org >> >> > Nevermind, the documentation just seems to be unclear. I do get .MS > back in ISO format (despite that not being shown as part of the ISO > format). It's just that none of my dates have milliseconds on them, > which is simply a bug I'll have to find. > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > > OK, sorry to flood on this, but there is still a problem. If I have no milliseconds, I'd like to get back ".000" at the end of the output. Since MS are indeed part of the ISO format, why don't get I get zeros? Alternatively, if MS aren't part of the ISO format, why do I get non-zeros?