Print Page | Close Window

determine 1st Monday of the month based on a patte

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21553
Printed Date: 24 Apr 2024 at 3:51pm


Topic: determine 1st Monday of the month based on a patte
Posted By: dagz200
Subject: determine 1st Monday of the month based on a patte
Date Posted: 17 Jun 2015 at 9:30am
I have several different work hrs schedules. They each start at a different date. meaning the first Monday for one schedule is different to the other schedules in any given month. For example 1st Monday on schedule "A" will the second Monday in a month while schedule "B" 1st Monday is the 3rd Monday of the month. The following month for schedule "A" 1st Monday will be the 3rd Monday of the month and schedule "B" will be the 4th Monday of the month. it changes month by month. There is a start date for each schedule to use when it will be the start of that schedule 1st Monday -Sunday and then 2nd Monday - Sunday etc. weeks for each month the 1st Monday will change as it continues the pattern. example:

Schedule A (Start date 6/15/15): 1st Sun - 0hrs (7/12/15), 1st Monday (6/15/15)- 8hrs, 1st Tue (6/16/15)- 8hrs, 1st Wed (6/17/15)- 8hrs, etc 2nd Sun (6/21/15)- 0 hrs, 2nd Monday (6/22/15)- 9 hrs, 2nd Tue (6/23/15)- 12 hrs, 2nd Wed (6/24/15)- 6 hrs, etc 3rd Sun (6/28/15)- 4 hrs, 3rd Monday (6/29/15)- 12 hrs 3rd Tues (6/30/15)- 0 hrs, 3rd Wed (7/1/15)- 0 hrs etc.

Schedule B (Start date 6/22/15): 1st Sun (7/19/15)- 12hrs, 1st Monday (6/22/15)- 4hrs, 1st Tue (6/23/15)- 0hrs, 1st Wed (6/24/15)- 0hrs, etc 2nd Sun (6/28/15)- 0 hrs, 2nd Monday (6/29/15)- 8 hrs, 2nd Tue (6/30/15)- 8 hrs, 2nd Wed (7/1/15)- 8 hrs, etc 3rd Sun (7/12/15)- 4 hrs, 3rd Monday (7/13/15)- 9 hrs 3rd Tues (7/14/15)- 9 hrs, 3rd Wed (7/15/15)- 9 hrs etc.



Print Page | Close Window