daynumber PowerHome formula function
Description
Gets the week day number (Sun=1, Sat=7) of a valid date value (either the output of a function eg, today() or a date 'literal' value such as
2010-12-15) and returns the number of the weekday.
See the
Date / Time Functions section for detailed information concerning date / time formats.
Syntax
daynumber ( date )
Argument |
Description |
date
|
The date value from which you want the number of the day of the week
|
Return value
Integer. Returns an integer (1-7) representing the day of the week of date. Sunday is day 1, Monday is day 2, and so on.
Examples
The following examples demonstrate typical syntax/usage for this function.
• daynumber(today()) --> evaluates to: 5
• daynumber(2010-12-15) --> evaluates to: 4
• daynumber("2010-12-15") --> Fails (string value vs date value. Use daynumber(date("2010-12-15")) for this format)