DB2 timestamp PHP DateTime

Posted by Dolfa on Stack Overflow See other posts from Stack Overflow or by Dolfa
Published on 2012-09-29T15:34:42Z Indexed on 2012/09/29 15:37 UTC
Read the original article Hit count: 208

Filed under:
|
|

After upgrade to PHP 5.3 my application is returning DB2 columns with Timestamp type as "2010-12-15-10.23.22.716000". This is causing problem for PHP DateTime function, as it fails with

Failed to parse time string (2010-12-15-10.23.22.716000) at position 25 (0): Unexpected character

It seems its having a problem with too much accuracy in DB2 timestamp. Can I somehow force connection to change timestamp format with it is fetching data into?

© Stack Overflow or respective owner

Related posts about php

Related posts about db2