Hello everyone, I've been unsuccessful in finding the place in the documentation which describes how to determine the format of dates and timestamps in the string returned by PQgetvalue. It's been reported that on some systems we get something like: %d/%m/%Y %H:%M:%S.00 %Z and others: %m-%d-%Y %H:%M:%S %Z Is this version/local dependent? Or better yet, is there an API in which we can query about the format or even set it? I'd like to avoid wrapping all date and timestamp attributes in to_char() if possible. Thanks for any advice or pointers. Cheers, David PS: I'm not subscribed.
David Ayers <d.ayers@inode.at> writes:
> It's been reported that on some systems
> we get something like:
> %d/%m/%Y %H:%M:%S.00 %Z
> and others:
> %m-%d-%Y %H:%M:%S %Z
> Is this version/local dependent?
No, but it is dependent on the DateStyle configuration variable ...
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера