# CURRENT_DATETIME

Returns the current date and time according to the specified or default timezone.

## Sample usage

`CURRENT_DATETIME()`  

`CURRENT_DATETIME("America/Los_Angeles")`

## Syntax

`CURRENT_DATETIME([time_zone_name])`

### Parameters

- `time_zone_name` - Optional. A text field or an expression that represents the time zone.

#### Time zone name

A time zone name is a tz identifier from the
[tz database](http://www.iana.org/time-zones).

For a less comprehensive but simpler reference, see the
[List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
on Wikipedia.

Examples:

    America/Los_Angeles
    America/Argentina/Buenos_Aires
    Etc/UTC
    Pacific/Auckland

When you use a time zone name, a space is required between the name and the rest
of the timestamp:

    2014-09-27 12:30:00.45 America/Los_Angeles

Note that not all time zone names are interchangeable even if they report the
same time during a given part of the year. For example,
`America/Los_Angeles` reports the same time as `UTC-7:00` during daylight
saving time (DST), but it reports the same time as `UTC-8:00` outside of DST.

If a time zone isn't specified, the default time zone value, UTC, is used.

If the `time_zone_name` parameter evaluates to `NULL`, this function returns `NULL`.

## Return data type

Date \& Time

## Examples

| Example formula |
|---|
| `CURRENT_DATETIME()` |
| `CURRENT_DATETIME("America/Los_Angeles")` |
| `CURRENT_DATETIME("Asia/Tokyo")` |

## Notes

This function is not available for [compatibility mode date types](https://docs.cloud.google.com/data-studio/dates-and-times#date_time_compatibility_mode).

## Related resources

- [Dates and times](https://docs.cloud.google.com/data-studio/dates-and-times)
- [Calculated fields](https://docs.cloud.google.com/data-studio/about-calculated-fields)
- [Data Studio function list](https://docs.cloud.google.com/data-studio/function-list)