February 17, 200817 yr I have a week number that I want to convert into the (monday) date that week begins on. Like next week is week 8 so i want to generate Feb 18, 2008, like it looks at the top of a quickbooks web entry. Its easy to go from date to week but this way isn't clear.
February 17, 200817 yr Are we talking about a week number that follows the same rules as Filemaker's WeekOfYear() function?
February 17, 200817 yr Author yes, we are, but i'm starting with that. But now i've decided that I shouldn't work with week numbers. I'll work with real dates and just increment or decrement them by 7 when moving thru records. But i'm trying to make a script that will give me the current 'week of' so if i clicked on it today i'd get "Feb 11, 2008" The following calculation does not work and i've tried it so many ways i'll just give you the latest and someone can tell me what is wrong with my syntax. Case ( DayName ( Get ( CurrentDate ) ) ="Monday"; Date ( Get ( CurrentDate ) ; DayName ( Get ( CurrentDate ) ) ="Tuesday"; (Date ( Get ( CurrentDate )-1 ) ); )
February 17, 200817 yr Get (CurrentDate) is not a valid argument for the Date() function. In addition, your parentheses are placed incorrectly. It seems that your week starts on Monday? That is NOT how FM computes its weeks. Anyway, to get the date of this week's starting Monday, you don't need an elaborate Case() statement, you can compute it directly by: Get (CurrentDate) - DayOfWeek ( Get (CurrentDate) - 1 ) + 1
Create an account or sign in to comment