Avatar of Maliki Hassani
Maliki Hassani
Flag for United States of America asked on

Crystal Reports: Best way to write a time query

Hello Experts,

I am trying to duplicate a query that is in SQl to Crystal syntax.  I am trying to get a true or false for the following:

Event_Start_Time is greater than 60 minutes from the Ticket_Create_Date.  In SQL the where clause looks like:
FROM EVENT_TABLE
WHERE (UDF_CONVERT_UNIX_DATETIME(EVENT_START_TIME, 'US/Eastern') + INTERVAL '1' HOUR) < UDF_CONVERT_UNIX_DATETIME(DATE_CREATED, 'US/Eastern')

If I knew how to write the + interval '1'Hour I could figure it out.  The table output is in unix time or I can have it as a date_time format.  I have views that changes the format.

if ({EVENT_TABLE.TKT_DATE_ACTUAL_START} < {EVENT_TABLE.TKT_DATE_CREATED}) by 1 hour Then
    'Greater than 1 hour'
else
    'Less than 1 hour';
Crystal Reports

Avatar of undefined
Last Comment
Maliki Hassani

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mike McCracken

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Maliki Hassani

ASKER
Thanks, will review!
Maliki Hassani

ASKER
Excellent!  Thank you again!
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23