The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.

TIMESTAMP query depending on vertica server location

Hi

We have a table storing a raw TIMESTAMP value (without any extra timezone information. We would like to query that column assuming UTC timestamp and returning it at UTC. When performing such a query vertica applies a number of implicit conversions, I believe based on the location of the server which in our case is running at 'Europe/London'. We managed to construct a query that returns what we want but it seems a bit clunky:

select ts at time zone 'Europe/London' at time zone 'UTC' as ts from MyTable where ts > '2019-04-24 11:00:07.353 UTC' and ts < '2019-04-24 11:00:07.477 UTC';

Is there a way to avoid double timestamp conversion? If not, is there at least a way to embed server timezone in the query itself rather than hardcoding 'Europe/London'?

Thank you

Tagged:

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.