[comment]: # (terms: date, dayofmonth, dayofweek, now, time )

[comment]: # ({7b2765b5-493edd72})
# 3 Date and time functions

All functions listed here are supported in:

-   [Trigger expressions](/manual/config/triggers/expression)
-   [Calculated items](/manual/config/items/itemtypes/calculated)

::: noteimportant
Date and time functions cannot be used in the expression by themselves; at least one function from [another group](/manual/appendix/functions), referencing the host item, must be included in the expression (except the nodata function). For detailed information on how date and time functions  work within expressions, see [Calculation time](/manual/config/triggers#calculation_time).
:::

|FUNCTION|<|<|
|--|--|--|
|**Description**|**Function-specific parameters**|**Comments**|
|**date**|<|<|
|Current date in YYYYMMDD format.| |Example:<br>=> **date**()<20220101|
|**dayofmonth**|<|<|
|Day of month in range of 1 to 31.| |Example:<br>=> **dayofmonth**()=1|
|**dayofweek**|<|<|
|Day of week in range of 1 to 7 (Mon - 1, Sun - 7).| |Example (only weekdays):<br>=> **dayofweek**()<6<br><br>Example (only weekend):<br>=> **dayofweek**()>5|
|**now**|<|<|
|Number of seconds since the Epoch (00:00:00 UTC, January 1, 1970).| |Example:<br>=> **now**()<1640998800|
|**time**|<|<|
|Current time in HHMMSS format.| |Example (only nighttime, 00:00-06:00):<br>=> **time**()<060000|

[comment]: # ({/7b2765b5-493edd72})
