pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Date format
6+ messages / 4 participants
[nested] [flat]

* Date format
@ 2000-07-26 15:08 Paulo Roberto Siqueira <paulo.siqueira@usa.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Paulo Roberto Siqueira @ 2000-07-26 15:08 UTC (permalink / raw)
  To: PGSQL Novice <pgsql-novice@postgresql.org>; pgsql-admin

	How can I setup postgres to accpet/store date in format dd/mm/yyyy? And
time in 24hs format?

-----
Paulo Roberto Siqueira
paulo.siqueira@usa.net
Database Administrator
Goiania - GO - Brazil




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Date Format
@ 2003-04-08 09:59 Ben Clewett <B.Clewett@roadrunner.uk.com>
  2003-04-08 12:37 ` Re: Date Format Nabil Sayegh <postgresql@e-trolley.de>
  2003-04-08 14:33 ` Re: Date Format Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 6+ messages in thread

From: Ben Clewett @ 2003-04-08 09:59 UTC (permalink / raw)
  To: pgsql-novice@postgresql.org


I am looking at date formats.  There seem to be a very limited set: 
'ISO,'  'SQL', 'Postgres' and 'German' with sub-format of: 'European' 
and 'NonEuropean'.

Has any member developed any way of having a more elaborate formats. 
Like, idealy, an Agregate function which sets the date to any desired 
format?

Thanks in advance for any help,

Ben




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Date Format
  2003-04-08 09:59 Date Format Ben Clewett <B.Clewett@roadrunner.uk.com>
@ 2003-04-08 12:37 ` Nabil Sayegh <postgresql@e-trolley.de>
  2003-04-08 12:49   ` Re: Date Format Ben Clewett <B.Clewett@roadrunner.uk.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Nabil Sayegh @ 2003-04-08 12:37 UTC (permalink / raw)
  To: Ben Clewett <B.Clewett@roadrunner.uk.com>; +Cc: pgsql-novice <pgsql-novice@postgresql.org>

Am Die, 2003-04-08 um 11.59 schrieb Ben Clewett:

> Has any member developed any way of having a more elaborate formats. 
> Like, idealy, an Agregate function which sets the date to any desired 
> format?

AFAIR an aggregate is something that summarizes many rows to 1 row like:
avg(), sum() etc. (in grouped queries)

cu
-- 
 e-Trolley Sayegh & John, Nabil Sayegh
 Tel.: 0700 etrolley /// 0700 38765539
 Fax.: +49 69 8299381-8
 PGP : www.e-trolley.de




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Date Format
  2003-04-08 09:59 Date Format Ben Clewett <B.Clewett@roadrunner.uk.com>
  2003-04-08 12:37 ` Re: Date Format Nabil Sayegh <postgresql@e-trolley.de>
@ 2003-04-08 12:49   ` Ben Clewett <B.Clewett@roadrunner.uk.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Ben Clewett @ 2003-04-08 12:49 UTC (permalink / raw)
  To: Nabil Sayegh <postgresql@e-trolley.de>; +Cc: pgsql-novice <pgsql-novice@postgresql.org>

Yes, sorry, I mean a Function...

Ben

Nabil Sayegh wrote:
> Am Die, 2003-04-08 um 11.59 schrieb Ben Clewett:
> 
> 
>>Has any member developed any way of having a more elaborate formats. 
>>Like, idealy, an Agregate function which sets the date to any desired 
>>format?
> 
> 
> AFAIR an aggregate is something that summarizes many rows to 1 row like:
> avg(), sum() etc. (in grouped queries)
> 
> cu




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Date Format
  2003-04-08 09:59 Date Format Ben Clewett <B.Clewett@roadrunner.uk.com>
@ 2003-04-08 14:33 ` Tom Lane <tgl@sss.pgh.pa.us>
  2003-04-08 14:50   ` Re: Date Format Ben Clewett <B.Clewett@roadrunner.uk.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Tom Lane @ 2003-04-08 14:33 UTC (permalink / raw)
  To: Ben Clewett <B.Clewett@roadrunner.uk.com>; +Cc: pgsql-novice@postgresql.org

Ben Clewett <B.Clewett@roadrunner.uk.com> writes:
> Has any member developed any way of having a more elaborate formats. 

There's always to_char() ... it's pretty ugly but can format a date
practically any way you want.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Date Format
  2003-04-08 09:59 Date Format Ben Clewett <B.Clewett@roadrunner.uk.com>
  2003-04-08 14:33 ` Re: Date Format Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-04-08 14:50   ` Ben Clewett <B.Clewett@roadrunner.uk.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Ben Clewett @ 2003-04-08 14:50 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-novice@postgresql.org

I see...

Found the reference:

http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=functions-formatting.html

to_char(my_timestamp, 'DD/MM/YY')

This looks really exactly what I want, thanks!

Ben

Tom Lane wrote:
> Ben Clewett <B.Clewett@roadrunner.uk.com> writes:
> 
>>Has any member developed any way of having a more elaborate formats. 
> 
> 
> There's always to_char() ... it's pretty ugly but can format a date
> practically any way you want.
> 
> 			regards, tom lane
> 




^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2003-04-08 14:50 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-07-26 15:08 Date format Paulo Roberto Siqueira <paulo.siqueira@usa.net>
2003-04-08 09:59 Date Format Ben Clewett <B.Clewett@roadrunner.uk.com>
2003-04-08 12:37 ` Re: Date Format Nabil Sayegh <postgresql@e-trolley.de>
2003-04-08 12:49   ` Re: Date Format Ben Clewett <B.Clewett@roadrunner.uk.com>
2003-04-08 14:33 ` Re: Date Format Tom Lane <tgl@sss.pgh.pa.us>
2003-04-08 14:50   ` Re: Date Format Ben Clewett <B.Clewett@roadrunner.uk.com>

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