Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies

I can calculate the current week using the following calculation, but I do not complete understand why it works so I cannot make it calcuate last week or the week before that

DateToText(Status( CurrentDate) - Middle("6012345", Mod(Status( CurrentDate) - Date(1,3,1904),7)+2,1)) & "..." &DateToText( Status( CurrentDate) - Middle("6012345", Mod(Status( CurrentDate) - Date(1,3,1904),7)+1,1) + 5)

The above calc will give me 4/13/2003...4/19/2003, but what I need is calc that if it is a Monday would be the past 2 weeks. The example below.

4/6/2003...4/12/2003

and

3/31/2003..4/5/2003

Any help would be great.

Give this calc a try. This calc will only evaluate if it is Monday, otherwise the field will be empty. If you need to retain the values, you will need to use a script to set the values in the field. If you use as a calc, select "Do not store calculation results" under storage options.

Case(

DayofWeek(Status( CurrentDate)) = 2, DateToText(Status( CurrentDate) - 8)&"..."&DateToText(Status( CurrentDate) - 2)&"

Hi Brian,

ThisWeek'sSunday = Status(currentdate) - MOD(DayofWeek(Status(currentdate)) +7-1; 7) will return the 1st day of current week (Sunday in your calc ?)

ThisWeek'sSaturday = Status(currentdate) + MOD(7-DayofWeek(Status(currentdate)); 7) will return the last day of current week (Saturday in your calc ?)

ThisWeek = DateToText(ThisWeek'sSunday) & "..." & DateToText(ThisWeek'sSaturday)

IMHO The past weeks should be

PastWeek = DateToText(ThisWeek'sSunday -7) & "..." & DateToText(ThisWeek'sSaturday-7)

Past2Week = DateToText(ThisWeek'sSunday -14) & "..." & DateToText(ThisWeek'sSaturday-14)

and your calc should be B)

Case(DayofWeek(Status( CurrentDate)) = 2, PastWeek & "

isn't there a function "week of year"? or "week of fiscal year"

just do a calc on all your dated items and use currentweek -1, currentweek -2 and so on ...

Of couse, you will have to provide for last week of december ...

Hi,

isn't there a function "week of year"? or "week of fiscal year"

This would turn the dates in numbers though....

If you want to display the dates as asked using these functions, you'll lead to circular problems as you will need to re-use the calc based on the date given.

If your calc should be based on the week number, then check this post

Reversing week dates into regular dates

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.