cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports 13:create a formula that will idenitfy the date of the following friday

Former Member
0 Kudos

If {Test Completion ETA} is not null then calculate the date for the next Friday and insert it into {Prod Deployment ETA}.

Anyone have any ideas how I might be able to do this?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

former_member292966
Active Contributor
0 Kudos

Hi Scot,

Try this:

If {Test Completion ETA} <> Date (0, 0, 0) Then 
   {Test Completion ETA} + (6 - DayOfWeek ({Test Completion ETA})) 
Else Date (0, 0, 0); 

Date (0, 0, 0) is a NULL date.

Crystal starts the week on Sunday so Friday is actually day 6. You can check this by using DayOfWeek and use a Friday date. So now we can take the {Test Completion ETA} and add the difference between 6 and the DayOfWeek to get the next Friday.

Good luck,

Brian

Former Member
0 Kudos

Thanks! Worked Great!

Answers (1)

Answers (1)

0 Kudos

Hi Scot,

Hit the F1 key in CR Designer and then search for "friday" you'll get a few listings and this one may help you:

DateSerial (year, month, day)

Don