Equinox Online Help - Language Reference - A to Z
Day |
|
---|---|
Applies to | |
Syntax | Day(DateExpression) |
Action | [Function] Returns the day of the month for a specified date. |
Scope | Usable anywhere. |
Notes | This function extracts the day value from DateExpression and returns it as a number. The returned day number can take values from 1 to 31 inclusive. |
Category | Date handling |
See Also | Years, Year, Dayname, Dayofweek, Dayofyear, Dmy, Dmyadd, Leapyear, Month, MonthName, Months, ServerDateTime, Today, Week, WeekOfYear, WeekStart |
Example | This example calculates the next pay date for a new employee. It is this month if the salaries have not yet been paid, or next month otherwise. Note that payday is a number between 1 and 31 and nextpaydate is a date. nextpaydate = Dmy(payday, Today, Today) The next example sets up the variables EndYear and EndPoint for a project task. The value of EndPoint depends on the time unit (days, weeks or months) chosen for the project. case 7EndPoint = Week(EndDate)case 1EndPoint = Day(EndDate)case 30EndPoint = Month(EndDate)end switch |