blissland Posted February 17, 2008 Posted February 17, 2008 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.
comment Posted February 17, 2008 Posted February 17, 2008 Are we talking about a week number that follows the same rules as Filemaker's WeekOfYear() function?
blissland Posted February 17, 2008 Author Posted February 17, 2008 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 ) ); )
comment Posted February 17, 2008 Posted February 17, 2008 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
Recommended Posts
This topic is 6185 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now