How to get this week's Monday date 
Author Message
 How to get this week's Monday date

How do I get a report field to return this week's Monday date?  For example,
this week would be 1/16.  No year.
I guess I can handle the no year by putting m/d in the Format property.  But
what goes in the ControlSource Property.

Thanks in advance.

Doyle60



Mon, 10 Jul 2000 03:00:00 GMT  
 How to get this week's Monday date

Function DateStart() As Date
  DateStart = Date - WeekDay(Date, vbTuesday)
End Function

Quote:

>How do I get a report field to return this week's Monday date?  For
example,
>this week would be 1/16.  No year.
>I guess I can handle the no year by putting m/d in the Format property.
But
>what goes in the ControlSource Property.

>Thanks in advance.

>Doyle60



Tue, 11 Jul 2000 03:00:00 GMT  
 How to get this week's Monday date

Here is the answer to my own question:

Control Source:  =DateAdd("y",-Weekday(Now())+2,Now())
Format:  m/d

This returns: 1/19

The 2 in the expression above means it will give this week's Monday date.  If
you change the 2 to a 3, it will give Tuesday's date.

Doyle60



Tue, 11 Jul 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Date of Monday actual week

2. Wrong week number for last monday

3. How to show monday of this week on a form

4. every day show Monday and Friday of the week on a form

5. Showing Monday to Friday Week

6. Getting the date of the begenning of the week

7. Getting the Week Number from a date

8. Adding a variable number of weeks to today's date

9. Dates....finding all mondays.

10. Date / Same date or first day of week

11. Getting today's date.....

12. Combo date value set by code gets ignored by combo's list when opened

 

 
Powered by phpBB® Forum Software