getdate

In [ ]:
getdate()

Returns the current statement's start date and time as a TIMESTAMP value.

Returns

str_sql : SQL expression.

Example

In [79]:
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 [80]:
# Importing the stats module
import verticapy.stats as st

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