< Day Day Up > |
DayOfYear()Category: Date Syntax: DayOfYear ( Date ) Parameters: Date ”Any valid date (1/1/0001 “12/31/4000), expression that returns a date, or field that contains a date. The parameter can also be the numeric representation of a date (1 “1460970). Description: Returns a number representing the day of year (1 “366) for any valid date (1/1/0001 “12/31/4000). Examples: DayOfYear ( "12/31/2000" ) Returns 366 (leap year). DayOfYear ( "12/31/2001" ) Returns 365 (non “leap year). DayOfYear ( "1/24/2004" ) Returns 24 . DayOfYear ( dateField ) Returns the day number for the date stored in dateField . DayOfYear ( Get ( CurrentDate ) + 30 ) Returns the day of year for a date 30 days from now. Comments: You can use the DayOfYear function to check whether a particular year is a leap year. Given a field Year , the formula DayOfYear ( Date ( 12 ; 31 ; Year )) would return 366 if Year was a leap year, and 365 if it wasn't. |
< Day Day Up > |