pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Datetime problem
4+ messages / 4 participants
[nested] [flat]

* Re: Datetime problem
@ 2004-06-14 13:34  Achilleus Mantzios <achill@matrix.gatewaynet.com>
  parent: Eric Lemes <eric.lemes@zanthus.com.br>
  2 siblings, 0 replies; 4+ messages in thread

From: Achilleus Mantzios @ 2004-06-14 13:34 UTC (permalink / raw)
  To: Eric Lemes <eric.lemes@zanthus.com.br>; +Cc: pgsql-sql

O kyrios Eric Lemes egrapse stis Jun 14, 2004 :

> Hello there,
> 
> I'm with a little trouble with postgresql and date/time conversions:
> 
> - select to_timestamp('2004 10 10 00 00 00', 'YYYY MM DD HH MI SS')
> 
> the output is:
> 
> - 2004-10-09 23:00:00-03

Just do select to_timestamp('2004 10 10 00 00 00', 'YYYY MM DD HH MI 
SS')::timestamp
to get rid off timezone info.

> 
> Anybody can help me?
> 
> 
> []'s
> 
> Eric Lemes de Godoy Cintra
> Analista de Sistemas Líder
> Zanthus Sistemas e Equip. Automação S/A
> Desenvolvimento de Software
> 
> 
> 
> eric.lemes@zanthus.com.br
> Fone: 55(11) 3750-7077
> 
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.693 / Virus Database: 454 - Release Date: 31/5/2004
> 

-- 
-Achilleus




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

* Datetime problem
@ 2004-06-14 14:08  Eric Lemes <eric.lemes@zanthus.com.br>
  0 siblings, 3 replies; 4+ messages in thread

From: Eric Lemes @ 2004-06-14 14:08 UTC (permalink / raw)
  To: pgsql-sql

Hello there,

I'm with a little trouble with postgresql and date/time conversions:

- select to_timestamp('2004 10 10 00 00 00', 'YYYY MM DD HH MI SS')

the output is:

- 2004-10-09 23:00:00-03

Anybody can help me?


[]'s

Eric Lemes de Godoy Cintra
Analista de Sistemas Líder
Zanthus Sistemas e Equip. Automação S/A
Desenvolvimento de Software



eric.lemes@zanthus.com.br
Fone: 55(11) 3750-7077



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.693 / Virus Database: 454 - Release Date: 31/5/2004

Attachments:

logo_assinatura.bmp (image/bmp, 11.0K) download view image
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: Datetime problem
@ 2004-06-14 14:31  Stef <svb@ucs.co.za>
  parent: Eric Lemes <eric.lemes@zanthus.com.br>
  2 siblings, 0 replies; 4+ messages in thread

From: Stef @ 2004-06-14 14:31 UTC (permalink / raw)
  To: Eric Lemes <eric.lemes@zanthus.com.br>; +Cc: pgsql-sql

Hello Eric,

Are you looking for something like :
select to_char(timestamp 'now','YYYY MM DD HH MI SS');
or the values in your example below :
select to_char(timestamp '20041010 00:00:00','YYYY MM DD HH MI SS');

Eric Lemes mentioned :
=> Hello there,
=> 
=> I'm with a little trouble with postgresql and date/time conversions:
=> 
=> - select to_timestamp('2004 10 10 00 00 00', 'YYYY MM DD HH MI SS')
=> 
=> the output is:
=> 
=> - 2004-10-09 23:00:00-03
=> 
=> Anybody can help me?
=> 
=> 
=> []'s
=> 
=> Eric Lemes de Godoy Cintra
=> Analista de Sistemas Líder
=> Zanthus Sistemas e Equip. Automação S/A
=> Desenvolvimento de Software
=> 
=> 
=> 
=> eric.lemes@zanthus.com.br
=> Fone: 55(11) 3750-7077
=> 
=> 
=> 
=> ---
=> Outgoing mail is certified Virus Free.
=> Checked by AVG anti-virus system (http://www.grisoft.com).
=> Version: 6.0.693 / Virus Database: 454 - Release Date: 31/5/2004
=> 

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

* Re: Datetime problem
@ 2004-06-14 14:56  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Eric Lemes <eric.lemes@zanthus.com.br>
  2 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2004-06-14 14:56 UTC (permalink / raw)
  To: Eric Lemes <eric.lemes@zanthus.com.br>; +Cc: pgsql-sql

"Eric Lemes" <eric.lemes@zanthus.com.br> writes:
> - select to_timestamp('2004 10 10 00 00 00', 'YYYY MM DD HH MI SS')
> the output is:
> - 2004-10-09 23:00:00-03

What PG version is this, on what platform, and what's your current
timezone setting?

			regards, tom lane



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


end of thread, other threads:[~2004-06-14 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-14 14:08 Datetime problem Eric Lemes <eric.lemes@zanthus.com.br>
2004-06-14 13:34 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
2004-06-14 14:31 ` Stef <svb@ucs.co.za>
2004-06-14 14:56 ` Tom Lane <tgl@sss.pgh.pa.us>

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