hour¶
In [ ]:
hour(expr)
Returns the hour portion of the specified date as an integer, where 0 is 00:00 to 00:59.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
expr | object | ❌ | Expression. |
In [8]:
from verticapy import *
df = tablesample({"x": ['11-03-1993 12:00:00', '09-05-1959 03:00:00']}).to_vdf()
df["x"].astype("timestamp")
display(df)
In [9]:
# Importing the stats module
import verticapy.stats as st
# Applying the hour function
df["hour_x"] = st.hour(df["x"])
display(df)
