Damn, no such luck. My 2-formulas above doesn't work when current date changes. Obviously, I just don't get it & should jut give it up!
Can you attach the db here? They still return the expected dates for me:
?date() - Weekday(date()) + 8
1/7/2018
?date() + (14 - Weekday(date()))
1/13/2018
This is my test dB:
Steve, I extend my great appreciation for you taking the time & sending 'test_Mon2Sun' dbs. It's sort of what I'm looking for except (I should have mentioned) I need all 7-weekdays, "Sat" & "Sun." Your 'test_Mon2Sun' dbs Just run "Mon" thru "Fri." Might you be willing to revised & send back your 'test_Mon2Sun' dbs including "Sat" & "Sun?"
I would really be grateful if you could! Thanks.
Last edited by djclinton15; 01-05-2018 at 01:41 PM. Reason: Sentences reformatting
Oh and Steve, I need the weekdays starting with "Steve, I extend my great appreciation for you taking the time & sending 'test_Mon2Sun' dbs. It's sort of what I'm looking for except (I should have mentioned) I need all 7-weekdays, "Sat" & "Sun." Your 'test_Mon2Sun' dbs Just run "Mon" thru "Fri." Might you be willing to revised & send back your 'test_Mon2Sun' dbs including "Sat" & "Sun?"
I would really be grateful if you could! Thanks.
Mon" thru "Sun".
Tried you the syntax I adviced?
to return Monday of current week.Code:Date() - (Weekday(Date(),2) -1)
To get the query to return data from MyDate (without time part) interval from current ISO week:
Edit. When MyDate includes date AND time, then :Code:... WHERE MyDate Between (Date() - (Weekday(Date(),2) -1)) AND (Date() - (Weekday(Date(),2) -1) +6)
1. when there never are MyDate values at midnight, you can use the WHERE clause as
;Code:... WHERE MyDate Between (Date() - (Weekday(Date(),2) -1)) AND (Date() - (Weekday(Date(),2) -1) +7)
2. Most general way which work always, will be:
Code:... WHERE MyDate >= (Date() - (Weekday(Date(),2) -1)) AND MyDate < (Date() - (Weekday(Date(),2) -1) +7)
OK, I did/have not change any code in the two date functions.Steve, I extend my great appreciation for you taking the time & sending 'test_Mon2Sun' dbs. It's sort of what I'm looking for except (I should have mentioned) I need all 7-weekdays, "Sat" & "Sun." Your 'test_Mon2Sun' dbs Just run "Mon" thru "Fri." Might you be willing to revised & send back your 'test_Mon2Sun' dbs including "Sat" & "Sun?"
However, I added conditional formatting, changed the names of the subforms and did some general cleanup.
In the first dB, I only added a few dates for a couple of months for testing. I was only testing the functions.
In this dB, I added dates from 11/1/2017 to 2/28/2018. (using the code in Module 2)
Is this what you are looking for?
Steve, once again thanks very much for your time with me. One issue with the NextWeek Form you have starting from Sunday and ending on the following Sunday. Whereas, I wanted NextWeek's starting from next Monday and ending on the following Saturday. I.E. 1/8/2018 to 1/14/2018.
In the qryNextWeek you have: Between fWeekStartMonday(Date()+7) And fWeekEndSunday(Date()+7)
I tried making some changes, but had no luckBetween fWeekStartMonday(Date()+7) AndfWeekEndSaturday(Date()+6)
Again, can you tell me what changes need to make in order to have NextWeek's form starting from next Monday and ending on the following Saturday?
Last edited by djclinton15; 01-06-2018 at 10:13 AM. Reason: Revised
In your Post #1, you sayPost #20 :However I would like my weekday’s query to start from Monday and end on Sunday.Post #21:It's sort of what I'm looking for except (I should have mentioned) I need all 7-weekdays, "Sat" & "Sun."Post #24:Oh and Steve, I need the weekdays starting with "Mon" thru "Sun".OK, I'm totally lost. You keep saying you want from MONDAY through SUNDAY.
Then you give a date example 1/8/2018 to 1/14/2018.
MONDAY is 1/8/2018 (on my calendar) and the following SUNDAY is 1/14/2018 (on my calendar)!!
Since today is 1/6/2018 (Jan 6th):
Last Week was 12/25/2017 (Monday) through 12/31/2017 (Sunday)
This Week is 1/1/2018 (Monday) through 1/7/2018 (Sunday)
Next Week will be 1/8/2018 (Monday) through 1/14/2018 (Sunday).
Not sure what I am missing.
Are you now wanting Monday through ** Saturday **?Again, can you tell me what changes need to make in order to have NextWeek's form starting from next Monday and ending on the following Saturday?
If so, just for Next Week? Or for Last, This AND Next weeks?
Steve, I'm sincerely sorry for such confusion. I was quite confused myself juggling between 2-separate dbs. In 1-dbs I needed a current week form & next week form both having the weekdays starting from Monday and ending on Sunday. Simultaneously, I also was working on a 2nd-dbs where I needed a current week form & next week form both having the weekdays starting from Sunday and ending on Saturday. I know how ludicrous it must sound, but actually is true. Needless to say, I had my head up my a**! With your help (along with others here) I think I have it all sorted out much thanks to the members here.
No problems..... glad you figured it out.
So this is a pic of you??
I always wondered who it was........