Hello, Khurram http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html
s second of minute number 55 S fraction of second number 978 2016-10-27 13:54 GMT+03:00 Khurram Faraaz <[email protected]>: > All, > > I am on Drill 1.9.0 git commit ID : a29f1e29 on CentOS > > TO_TIMESTAMP function does not return correct results, note that the > minutes, seconds and milliseconds parts of timestamp are incorrect in the > results > > {noformat} > 0: jdbc:drill:schema=dfs.tmp> VALUES(TO_TIMESTAMP('2015-03-30 20:49:59.10 > UTC', 'YYYY-MM-dd HH:mm:ss.s z')); > +------------------------+ > | EXPR$0 | > +------------------------+ > | 2015-03-30 20:49:10.0 | > +------------------------+ > 1 row selected (0.228 seconds) > {noformat} > > {noformat} > 0: jdbc:drill:schema=dfs.tmp> VALUES(CAST(TO_TIMESTAMP('2015-03-30 > 20:49:59.10 UTC', 'YYYY-MM-dd HH:mm:ss.s z') AS TIMESTAMP)); > +------------------------+ > | EXPR$0 | > +------------------------+ > | 2015-03-30 20:49:10.0 | > +------------------------+ > 1 row selected (0.265 seconds) > {noformat} > > This case returns correct results, when the same string used above is given > as input to CAST function, note that minutes mm, seconds ss and millisecond > s parts are honored > > {noformat} > 0: jdbc:drill:schema=dfs.tmp> VALUES(CAST('2015-03-30 20:49:59.10 UTC' AS > TIMESTAMP)); > +------------------------+ > | EXPR$0 | > +------------------------+ > | 2015-03-30 20:49:59.1 | > +------------------------+ > 1 row selected (0.304 seconds) > {noformat} > > Thanks, > Khurram >
