influxdb-java
influxdb-java copied to clipboard
Is there a way to get QueryResult like 'yyyy-MM-dd HH:mm:ss'?
Presently the time format of queryResult of rfc3339 is something like yyyy-MM-dd'T'HH:mm:ssX
, which I excepted was yyyy-MM-dd HH:mm:ss
like https://docs.influxdata.com/influxdb/v1.8/query_language/explore-data/#rfc3339-like-date-time-string.
Using SimpleDateFormat needs two-time converting
SimpleDateFormat inputSdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX");
SimpleDateFormat outputSdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date parse = inputSdf.parse(dateStr);
String format = outputSdf.format(parse);
Is there a way to get like that?
In addition, how can I get result like 1.4252832E9
to be a plain number with no converting?
In addition, how can I get result like
1.4252832E9
to be a plain number with no converting?
https://github.com/influxdata/influxdb-java/issues/440#issuecomment-483896165