Prestodb: Difference between revisions
From wikinotes
(Created page with "dates https://prestodb.io/docs/current/functions/datetime.html") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
= Documentation = | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| official docs || https://prestodb.io/docs/current/index.html | |||
|- | |||
| date/time methods || https://prestodb.io/docs/current/functions/datetime.html | |||
|} | |||
</blockquote><!-- Documentation --> | |||
= 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 --> |
Latest revision as of 16:48, 17 February 2022
Documentation
official docs https://prestodb.io/docs/current/index.html date/time methods 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)