to_date function

Поиск
Список
Период
Сортировка
От Carlos Henrique Reimer
Тема to_date function
Дата
Msg-id AANLkTinljUkkDJp8vjknaMoONMPfsYRa9ibCQxkeCVpr@mail.gmail.com
обсуждение исходный текст
Ответы Re: to_date function  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: to_date function  (Ludwig Kniprath <ludwig@kni-online.de>)
Список pgsql-general
Hi
 
I've a Linux box running postgresql 8.2.17 and facing some strange results from the to_date function.
 
As you can see in the following tests the problem occurs when the template used includes upper and lower case characters for the minute (Mi or mI).
 
Am I using the incorrect syntax or is it a bug?
 
Thank you in advance!
 
template1=# select to_date('01/04/2013 23:59:59','DD/MM/YYYY HH24:Mi:SS')       ;
  to_date
------------
 2009-04-01
(1 row)
template1=# select to_date('01/04/2013 23:59:59','DD/MM/YYYY HH24:mi:SS')
;
  to_date
------------
 2013-04-01
(1 row)
template1=# select to_date('01/04/2013 23:59:59','DD/MM/YYYY HH24:mI:SS')
;
  to_date
------------
 2009-04-01
(1 row)
template1=# select to_date('01/04/2013 23:59:59','DD/MM/YYYY hH24:MI:SS')       ;
  to_date
------------
 2013-04-01
(1 row)

--
Reimer

В списке pgsql-general по дате отправления:

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: Want to schedule tasks for the future
Следующее
От: Josh Berkus
Дата:
Сообщение: Anyone in Madison?