jamin24b Posted August 16, 2006 Posted August 16, 2006 I'm working on a filter feature which goes by week. It currently indexes by the week number (1-52), but visually, I want it to show the date of the week's sunday, as in "Week of Sunday 8/13/05" I had made a calculation field that found today's date, then finds the day of the month. Then it subtracts the difference between the current day of the week and sunday (1). The problem is that if today is Friday the 2nd, the Sunday of this week would be in the previous month. That would mean having to distinguish between leap years and non leap years, and how many days each month has. Is there any easier way to do this?
comment Posted August 16, 2006 Posted August 16, 2006 This formula: date - DayOfWeek ( date ) + 1 returns the Sunday of the date's week.
jamin24b Posted August 16, 2006 Author Posted August 16, 2006 Wow, that simple. I didn't realize that you could subtract from a date format. That does return a date string right?
comment Posted August 16, 2006 Posted August 16, 2006 It returns a date (provided the calculation field is set to return a Date result).
Recommended Posts
This topic is 6673 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