Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: showing the date of monday of each week Post Reply Post New Topic
Author Message
krispie
Newbie
Newbie


Joined: 15 Dec 2010
Online Status: Offline
Posts: 2
Quote krispie Replybullet Topic: showing the date of monday of each week
    Posted: 03 Feb 2011 at 9:50pm
Hi there,
 
I have created a report to do a break down on a report to show information on customers on a week by week basis. 
 
However I want to show the date of each monday. 
 
So I can show week commencing 01/01/2011. 
 
How do I show this?
 
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 07 Feb 2011 at 3:43am
Because you're looking for a week that starts on Monday instead of Sunday, you can't just group on the date field and display for every week.  So, I would try creating a formula that looks something like this:
 
If DayofWeek({table.date}, crMonday) > 1 then
  {table.date}-DayofWeek{table.date}, crMonday) + 1
else
  {table.date}
 
This looks at the day number in the week based on the week starting on Monday.  Group on this formula to group your data by week.
 
-Dell
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.008 seconds.