elixir-google-api icon indicating copy to clipboard operation
elixir-google-api copied to clipboard

Querying Big Query for a timestamp does not return a timestamp

Open Adzz opened this issue 5 years ago • 1 comments

When I make a query to BQ on a column that is a utc datetime I am returned a string that looks like this:

%GoogleApi.BigQuery.V2.Model.TableCell{v: "1.561017697269367E9"}

I think it's returning a unix timestamp as a string, written in scientific notation, so for now if I do this it seems to work:

String.to_float("1.561017697269367E9") |> round |> DateTime.from_unix

Adzz avatar Jun 20 '19 08:06 Adzz

These clients aren't doing any formatting or conversion on the returned data. It just passes through whatever the API returns (in its JSON) which in this case appears to be these strings.

dazuma avatar Jun 29 '19 18:06 dazuma