Skip to Content
0

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

Oct 21, 2016 at 08:38 PM

46

avatar image
Former Member

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!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Brian Dong Oct 21, 2016 at 11:54 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks! Worked Great!

0
Don Williams
Oct 21, 2016 at 09:43 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded