Hi
I have a need to populate a field in a Crystal Report (using SAP Crystal Reports 13)
The Population of the field will depend on the following Criteria
If the Day of running the report is a Monday and the {Create_Date} is in the last 72 hours then tag the field as NEW
If the Day of running the report is any other day and the {Create_Date} is in the last 24 hours then tag the field as NEW
Any records whose {Create_Date} falls outside the above then tag the field as EXISTING
I have used this formula before to look back different times based on the Day of the week, but im a little lost what needs to be done to achieve the above
(
if dayofweek(currentdate) = 2 then
{BMCServiceDesk__Problem__c.BMCServiceDesk__Closed_Date_Time__c} in dateadd("h",-72, datetime(currentdate,time(11,0,0))) to datetime(currentdate,time(13,0,0))
else
{BMCServiceDesk__Problem__c.BMCServiceDesk__Closed_Date_Time__c} in dateadd("h",-24, datetime(currentdate,time(11,0,0))) to datetime(currentdate,time(13,0,0))
)
Very grateful if anyone can nudge me in the right direction
Thanks
I have a need to populate a field in a Crystal Report (using SAP Crystal Reports 13)
The Population of the field will depend on the following Criteria
If the Day of running the report is a Monday and the {Create_Date} is in the last 72 hours then tag the field as NEW
If the Day of running the report is any other day and the {Create_Date} is in the last 24 hours then tag the field as NEW
Any records whose {Create_Date} falls outside the above then tag the field as EXISTING
I have used this formula before to look back different times based on the Day of the week, but im a little lost what needs to be done to achieve the above
(
if dayofweek(currentdate) = 2 then
{BMCServiceDesk__Problem__c.BMCServiceDesk__Closed_Date_Time__c} in dateadd("h",-72, datetime(currentdate,time(11,0,0))) to datetime(currentdate,time(13,0,0))
else
{BMCServiceDesk__Problem__c.BMCServiceDesk__Closed_Date_Time__c} in dateadd("h",-24, datetime(currentdate,time(11,0,0))) to datetime(currentdate,time(13,0,0))
)
Very grateful if anyone can nudge me in the right direction
Thanks