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:

WhileReadingRecords;
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>

GET SOCIAL

QUICK TIP

To format a report section

Right-click the report section and click Format Section.

ADVERTISMENT