day PowerHome formula function
Description
Obtains the day of the month from a date value
(either the output of a function eg, today() or a date 'literal' value).
See the
Date / Time Functions
section for detailed information concerning date / time formats.
Syntax
day ( date )
Argument |
Description |
date
|
The date value (function output or literal) from which you want the day
|
Return value
Integer. Returns an integer (1-31) representing the day of the month in date.
Examples
The following examples demonstrate typical syntax/usage for this function.
• day(today()) --> evaluates to: 15
• day(2010-12-15) --> evaluates to: 15
• day(relativedate(date(year(today()),if(month(today())=12,1,month(today())+1),1), -1)) -->Finds the last day of the current month.
• day(12-15-2010) --> Fails (improper literal syntax)
• day("2010-12-15") -->Fails (String value instead of date value)