> For the complete documentation index, see [llms.txt](https://docs.e6data.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.e6data.com/product-documentation/sql-command-reference/date-time-functions/timezone-functions.md).

# Timezone Functions

#### <mark style="color:purple;">DATETIME(</mark>  \<expr>  \[,  \<timezone>]  <mark style="color:purple;">)</mark>

Returns the timestamp expression formatted to the given `timezone`. The default timezone is UTC.

```sql
> select datetime(datetime(current_timestamp, 'UTC'), 'Pacific/Samoa')
2023-01-05 22:27:20
```

#### <mark style="color:purple;">CONVERT\_TIMEZONE(</mark>  \<source\_timezone>, \<target\_timezone>, \<source\_timestamp>  <mark style="color:purple;">)</mark>

Returns the timestamp expression formatted to the given `timezone`. The default timezone is UTC.

<pre class="language-sql"><code class="lang-sql"><strong>> select convert_timezone('America/Los_Angeles','Africa/Cairo','2022-05-01 07:10:12');
</strong>2022-05-01 16:10:12
> select convert_timezone('America/Los_Angeles','2016-10-05 00:00:00');
2016-10-04 17:00:00

</code></pre>
