Today I worked with a reader of this blog to help with a challenge. The company wanted a Crystal Report filtered to only display data with the current date with a time equal to or after 10:00 PM and include records for next day with the time being equal to or before 7:00 AM.
The final Report Selection formula looked similar to this:
(DateDiff ("d",{ACTIVITY.STARTDATE} ,CurrentDate ) = 0 and Time({HISTORY.CREATEDATE}) >= TimeSerial (22, 00,00))
or
(DateDiff ("d",{ACTIVITY.STARTDATE} ,CurrentDate ) = 1 and Time({HISTORY.CREATEDATE}) <= TimeSerial (07, 00,00))
If you want to play with this you could use your Sage SalesLogix Activity table.
It was kind of a fun challenge and I thought some others would benefit from seeing the result. If you have similar challenges please feel to write me directly at george.jensen@customerfx.com.
Thanks for reading.
Geo