Prestodb: Difference between revisions

From wikinotes
(Created page with "dates https://prestodb.io/docs/current/functions/datetime.html")
 
No edit summary
Line 1: Line 1:
dates https://prestodb.io/docs/current/functions/datetime.html
dates https://prestodb.io/docs/current/functions/datetime.html
= Date Methods =
<blockquote>
<syntaxhighlight lang="sql">
date_format(thing.created_at, '%Y-%m-%d')
datetime_format(thing.created_at, '%Y-%m-%d %H:%M')
to_unixtime(thing.created_at)
</syntaxhighlight>
</blockquote><!-- Date Methods -->

Revision as of 16:47, 17 February 2022

dates https://prestodb.io/docs/current/functions/datetime.html

Date Methods

date_format(thing.created_at, '%Y-%m-%d')
datetime_format(thing.created_at, '%Y-%m-%d %H:%M')
to_unixtime(thing.created_at)