Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date to Day +1, 2, 3 Post Reply Post New Topic
Author Message
BoltzGirl
Groupie
Groupie
Avatar

Joined: 22 Jan 2013
Online Status: Offline
Posts: 89
Quote BoltzGirl Replybullet Topic: Date to Day +1, 2, 3
     Posted: 16 Jun 2014 at 7:47am
Using Crystal 11; I have a report that we need to say:
 
if cc.close.date is a Friday then +4 days and give me that date else
if cc.close.date is a Saturday then +3 days and give me that date else
if cc.close.date is a Sunday then +2 days and give me that date else
if cc.close.date is a Monday then +1 day and give me that date else
 
I have been thinking too long about this, probably over confused myself and just need some ideas.  It's an actual DATE field, so I think I am just over complicating the fact that I need to know the 'day' vs. date and then bring me back a date value.  Thanks in advance!Confused
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 16 Jun 2014 at 11:48am
if Weekday( cc.close.date) = 6 then dateadd("dd",+4, cc.close.date) else
if ...
IP IP Logged
BoltzGirl
Groupie
Groupie
Avatar

Joined: 22 Jan 2013
Online Status: Offline
Posts: 89
Quote BoltzGirl Replybullet Posted: 16 Jun 2014 at 12:28pm
I recieved an error on the "dd"...so dropped the d and left it singular and it worked like a gem!!!  Thank you kostya1122  :-)
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