?
Solved

Get day of week in CR based on current date.

Posted on 2011-04-29
3
Medium Priority
?
397 Views
Last Modified: 2012-05-11
Hello experts.  Here is what I need to do, I need to evaluate what the current day is.  So, basically something like this

If CurrentDate = Monday Then
Do something
Else If CurrentDate = Tuesday Then
Do something
etc., etc.

Can anyone tell me how to go about doing this.  Thanks!
0
Comment
Question by:jwebster77
3 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 35490822
Sunday is day 1...

if dayofweek(currentdate) = 2  then    //monday
.......
else if dayofweek(currentdate) = 3 then     //tuesday
....
0
 

Author Comment

by:jwebster77
ID: 35490850
Thanks!  Trying it now!
0
 
LVL 35

Expert Comment

by:James0628
ID: 35490929
Peter beat me to it.  I'll just add that you can also add a second argument to DayOfWeek if you want the week to start on some day besides Sunday.  For example, DayOfWeek (CurrentDate, crTuesday).  crMonday, crTuesday, etc. are CR constants for the day numbers.  Or, you can just use 1, 2, etc.

 James
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question