| Doc Type | Tips & Tricks |
| Email Setting | Make Public |
| Email Address | steve dot robinson at notes411 dot com |
| Keep informed? | Yes |
| Author | Steven Charles Robinson |
| Company Name | Notes411 |
| Category | @function, Date |
| Modified | 03/09/2006 10:36:14 |
| Subject | @function that calculates the end of week date based on a given date. |
This @function calculates the end of week
date based on a given date 'thisDate'. The following code uses Sunday
as the Start of the week and Saturday as the end of the week, i.e. Saturday
= 7 and Sunday = 1.
--------------------------------------------------------------------------------------
thisDate = "01/01/2006";
date := @Date(@Year(thisDate);@Month(thisDate);@Day(thisDate));
weekDay := @Weekday(date);
diff := 7 - weekDay;
"Ending " + @Text(@Adjust(date;0;0;diff;0;0;0))
|