Survey Tabulation > Advanced expressions > 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(Val)
Parameter
Val
Type: Date
The date for which you want to return the day.
(return)
Type: Long
The day of the month (1 to 31).
Remarks
This is equivalent to DatePart("d", Val).
Example
This example uses the Day function to return the day of the month from the current date (which is in turn returned by the Now function: see Now). For example, on 20 May 2002, this example would return 20.
Day(Now())
The next example uses the Day function to return the day stored in the DataCollection.FinishTime system variable.
DataCollection.FinishTime.Day()
See also
Date and time functions