Print Page | Close Window

Change first day of week

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4327
Printed Date: 05 May 2024 at 7:43am


Topic: Change first day of week
Posted By: Trisha22191
Subject: Change first day of week
Date Posted: 22 Sep 2008 at 10:08am
Hi.
I am wondering how to change the first day of the week from default of Sunday to Friday?
I've been looking and I cannot find the answer.
 
thanks.



Replies:
Posted By: tdrio
Date Posted: 22 Sep 2008 at 11:30am
Hi,
 
You can use the function DayOfWeek (date, firstDayOfWeek), and specify the 1th day of the week you want
 
DayOfWeek(CurrentDate, crMonday) result 1; Monday is 1th day of week
DayOfWeek(CurrentDate, crSunday) result  2; Monday is 2nd day of week
 
Regards


Posted By: Trisha22191
Date Posted: 22 Sep 2008 at 11:52am
is it as simple as creating a separate function to change it. or do i need to do this with a date function i already have?


Posted By: Trisha22191
Date Posted: 22 Sep 2008 at 12:03pm
i am grouping on labor entry date (startdate).  I then need to be sure the totals for this group are within the pay week (Friday to Thurs).  Since CR defaults the start of week to Sunday, when I run my calculations it bases it on Sunday to Saturday, making my figures off.
 
I need to know where I would change the first day of the week to Friday.



Print Page | Close Window