Leigh, Try the following statement (I've substituted a SQL-based calculation of epoch time for the $TIMESTAMP$ value):
SELECT count(*) FROM Issue WHERE Customer_Abbreviation = '$Customer_Abbreviation$' AND Create_Date > (ABS(DATEDIFF(ss,GetUTCDate(),'1970-01-01')) - ($Threshold Days$ * 24 * 60 * 60)) ABS(DATEDIFF(ss,GetUTCDate(),'1970-01-01')) represents the current date and time in epoch time. I'm assuming $Threshold Days$ is already an integer value; if not, you may need to include a CAST function to convert it from a varchar to an int. Cheers, Jim. _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are"

