java - Bigquery.jobs().query returns epoch time 1.295353708E9 for timestamp column -
bigquery.jobs().query().execute returns epoch time timestamp , epoch time includes dot trailing alphanumeric value(1.295353708e9) converting value java timestamp fails;
object v = checknullandgetcolumnvalue(columnindex); long epoch = long.parselong(v.tostring()); string date = new java.text.simpledateformat("mm/dd/yyyy hh:mm:ss").format(new java.util.date (epoch*1000)); the returned value 1.295353708e9 same 1295353708 not sure best way handle bq web ui renders it.
any help highly appreciated!
this should work:
long epoch = double.valueof('1.295353708e9').longvalue(); string date = new simpledateformat("mm/dd/yyyy hh:mm:ss") .format(new date (epoch*1000)); with given illustration value, date string resolves 01/18/2011 21:28:28.
java google-bigquery
No comments:
Post a Comment