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>



When in the formula editor, Start out by typing the first charter of the function, press Ctrl-Space. The keyword auto complete will than show a list of the functions available beginning with the charter you typed in.