Developer Documentation Library > UNICOM Intelligence Function Library > Date and time functions > Day
 
Day
Returns a whole number between 1 and 31, inclusive, representing the day of the month.
Syntax
Day(<value>)
Parameters
<value>
Type: Date
The date for which you want to return the day.
(return)
Type: Long
The day of the month (1 to 31).
Notes
This is equivalent to DatePart("d", Val).
Example
This example returns the day of the month from the current date (which is in turn returned by the Now function). For example, on 31 January 2023, this example returns 31.
Day(Now())
The following example returns the day stored in the DataCollection.FinishTime system variable.
DataCollection.FinishTime.Day()
See also
DateAdd
Date and time functions