| От | John R Pierce |
|---|---|
| Тема | Re: Junk date getting uploaded into date field |
| Дата | |
| Msg-id | 527A04F8.6030409@hogranch.com обсуждение исходный текст |
| Ответ на | Re: Junk date getting uploaded into date field (Steve Crawford <scrawford@pinpointresearch.com>) |
| Список | pgsql-general |
On 11/5/2013 10:29 AM, Steve Crawford wrote:
> The to_date and to_timestamp functions do minimal input error-checking
> and are intended for conversion of non-standard formats that cannot be
> handled by casting. These functions will attempt to convert illegal
> dates to the best of their ability, e.g. to_date('33-OCT-2013',
> 'dd-mon-yyyy') will return 2013-11-02. Users of these functions are
> advised to perform whatever external error-checking they deem prudent.
I think this should also point out that this behavior is different than
cast, which is much stricter.
the fact that these two methods are polar opposites in this behavior is
troublesome.
--
john r pierce 37N 122W
somewhere on the middle of the left coast
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера