Re: Date Formatting
От | Doug Silver |
---|---|
Тема | Re: Date Formatting |
Дата | |
Msg-id | Pine.LNX.4.21.0205031353290.4244-100000@danzig.sd.quantified.net обсуждение исходный текст |
Ответ на | Date Formatting (Tom Ansley <tansley@law.du.edu>) |
Ответы |
Re: Date Formatting
|
Список | pgsql-novice |
Hi Tom - select cast (now() as date) as date; date ------------ 2002-05-03 Depending on your application (e.g. perl/php script), that output is easy enough change it around to what you want or you could certainly write a function to do it -- something I have yet to do! I think such a function would be fairly easy to do since you're just rearranging the output, but doesn't everything look easy at the outset? You didn't mention the context of what you need this for, so there are lots of ways to do this. -doug On Fri, 3 May 2002, Tom Ansley wrote: > I am writing timestamps to file and the formatting is currently 2002-06-06 > 00:00:00.0. Is there a function to only write the date and also to format it > something like MM/dd/yyyy ? > > Thanks > > Tom > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Doug Silver Network Manager Urchin Corporation http://www.urchin.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
В списке pgsql-novice по дате отправления: