getutcdate

In [ ]:
getutcdate()

Returns the current statement's start date and time at TIME ZONE 'UTC' as a TIMESTAMP value.

Returns

str_sql : SQL expression.

Example

In [81]:
from verticapy import *
df = tablesample({"x": [1, 2, 3, 4]}).to_vdf()
display(df)
123
x
Int
11
22
33
44
Rows: 1-4 | Column: x | Type: int
In [82]:
# Importing the stats module
import verticapy.stats as st

# Using the getutcdate function
df["date"] = st.getutcdate()
display(df)
123
x
Int
📅
date
Datetime
112020-12-05 11:40:00.513293
222020-12-05 11:40:00.513293
332020-12-05 11:40:00.513293
442020-12-05 11:40:00.513293
Rows: 1-4 | Columns: 2