Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First Monday of the Current Month

Status
Not open for further replies.

dfaith

Programmer
Apr 16, 1999
18
US
Does anyone know of a way to determine the first Monday of the current month?

I am using version 7.0

Thanks in advance.
 
Test this and let me know if it works.
It should work in any version of CR.


WhileReadingRecords;
DateVar BOM;
DateVar BOW;

BOM:= CurrentDate - Day(CurrentDate) + 6;
BOW := BOM - DayOfWeek(BOM)+2

Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Thank you Ken! It worked perfectly. I also found that the following will work since I am only running this for the current month and only need the First Monday for the current month:

totext(month(CurrentDate))+'/'+totext(DayofWeek(CurrentDate - Day(CurrentDate) + 6)+2)+'/'+totext(Year(CurrentDate));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top