BOFocus – Crystal Reports Tips – Tricks – Tutorials

Crystal Reports - Formulas

Finding the first friday of the month

Create the following formula and place in the detail section, the results wil return the first Friday of the month:

DateVar D:= Currentdate;
Numbervar DOW := 6;
NumberVar Week := 1;
DateVar BOM:= D – Day(D)+(8-DOW);
DateVar BOW:= BOM – DayOfWeek(BOM) + DOW + (7*(Week – 1));

Tagged , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



To change the formatting for multiple text boxes at one time, hold the Shift key while clicking on each text box. Once they’ve all been selected, click on the desired formatting icon(s).