Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date range fix 1

Status
Not open for further replies.

gdangerfield

Technical User
Nov 26, 2003
5
US
I'm not that conversant in Crystal (Version 11). With that said, I created this report, and I want the labels to show all prescriptions to show that have a "soc" date within the past week from Saturday (Not Sunday). I don't know how to make queries for dates > mm-dd-yyyy. This is a SQL database I believe. I'd appreciate any help. Thanks


{LABELS.DISCYN} <> "*" and
{HR.PAT_STAT} in ["Active", "Pending"] and
not ({LABELS.RX_TYPE} in ["ANAPHYL", "ANCIL", "IVCATH", "TPN Cmpd"]) and
{HR.SOC} = WeekToDateFromSun
 
try changing the last line to this:

{HR.SOC} >= CurrentDate - dayofweek(CurrentDate)

This calculation always give you the prior Saturday.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top