to_date has beaten me...

Поиск
Список
Период
Сортировка
Искать
От
Rodger Donaldson
Тема
to_date has beaten me...
Дата
Msg-id
20030206040247.GA8032@diaspora.gen.nz
Список
Дерево обсуждения
to_date has beaten me... Rodger Donaldson <rodgerd@diaspora.gen.nz>
Re: to_date has beaten me... Tom Lane <tgl@sss.pgh.pa.us>
Re: to_date has beaten me... Rodger Donaldson <rodgerd@diaspora.gen.nz>
Re: to_date has beaten me... Roberto Mello <rmello@cc.usu.edu>
Re: to_date has beaten me... Rodger Donaldson <rodgerd@diaspora.gen.nz>

Postgresql 7.2.3

insert	
into 	log_entries 
values	(to_date('06/Feb/2003:11:29:11 +13', 'DD/Mon/YYYY:HH24:MI:SS'),0,302,[... various other data elided ...]);

Always inserts the correct date, but sets the time to midnight.

Thinking this might be solved by shuffling with the source data, I've
tried such combinations as:

to_date('06/Feb/2003:11:29:11', 'DD/Mon/YYYY:HH24:MI:SS')
to_date('06/Feb/2003:11:29:11 +13', 'DD/Mon/YYYY:HH:MI:SS')
to_date('06/02/2003:11:29:11', 'DD/MM/YYYY:HH24:MI:SS')

...and so forth, but despite the column in question being a timestamp
with timszone, everything except the date gets truncated.

-- 
Rodger Donaldson		rodgerd@diaspora.gen.nz
"My ATEX terminal isn't working"
"Is there power to the keyboard?"
"No, and it has smoke and flames coming out of it"

В списке pgsql-sql по дате отправления
От: Neal Lindsay
Дата:
От: Tom Lane
Дата:
Сообщение: Re: to_date has beaten me...
FAQ