Print Page | Close Window

Formula for Specific Days of the Week

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22594
Printed Date: 19 Apr 2024 at 9:47pm


Topic: Formula for Specific Days of the Week
Posted By: GPDJJ
Subject: Formula for Specific Days of the Week
Date Posted: 09 May 2018 at 10:13am
So I created the formula below and the use the Select Expert to select days of the week. Is there a better way to do this in an all encompassing formula rather than doing two steps? For instance like only selecting on records on a Wednesday or Thursday.

weekdayname(dayofweek({table.field}))






Replies:
Posted By: DBlank
Date Posted: 10 May 2018 at 2:52am
maybe create a static parameter with the 7 days of the week as the description but the numeric values as 1-7

In your select expert use either datepart or dayofweek functions
{?Week Day} = dayofweek({table.date})

You can also set it to allow multiple selections



Print Page | Close Window