I need to review the current date and time zone from Elasticsearch. I'm checking the elastic documentation and it mentioned that the default value is UTC.

In other environments I use:


Is there any similar function for Elasticsearch?

1 Answer 1


According to these docs there's a CURRENT_TIMESTAMP function and all you need to run is SELECT CURRENT_TIMESTAMP AS result; which will return the current date and time as a timestamp, from the server.

Description from the aforementioned docs:

Returns the date/time when the current query reached the server. As a function, CURRENT_TIMESTAMP() accepts precision as an optional parameter for rounding the second fractional digits (nanoseconds). The default precision is 3, meaning a milliseconds precision current date/time will be returned.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.