Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Calculating first Monday date in week Post Reply Post New Topic
Author Message
Mailman
Newbie
Newbie
Avatar

Joined: 21 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 12
Quote Mailman Replybullet Topic: Calculating first Monday date in week
     Posted: 16 Dec 2008 at 6:20am
Hi I am trying to create a date range for a weekly enrolment report . At the minute I am trying retrieve the Monday date of the week the student enrolled based on there enrolment date  .
 
 
At the moment I can only get the last Monday in that Month .
 
Can anybody help please.
 
Local DateTimeVar d1 := {stmaos.dt_achieved};

Local DateVar d2;

d2 := DateSerial(Year(d1), Month(d1)+ 1, 1 - 1);

d2 - (DayofWeek(d2, crMonday)-1)

IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 16 Dec 2008 at 7:00am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum