Solved

Crystal Reports - Compare Date Time with Current Date and Time

Posted on 2014-09-24
5
1,287 Views
Last Modified: 2014-09-28
Hello:

I have a report that pulls pricing by date and time - I need to suppress any Lines with Pricing when the download is over 24 hours old.  The Date and time fields are separate fields on the report.  The details are all in the details a section of the report.

Thanks in advance!
0
Comment
Question by:eleale
  • 3
  • 2
5 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 40342076
Is there a reason you are pulling all the data rather than just the ones you want to display?

Try this
Selection formula
DateTime(Date({Datefield}), Time({TimeField})) >= CurrentDateTime - 1

Suppression formula
DateTime(Date({Datefield}), Time({TimeField})) <  CurrentDateTime - 1

If that doesn't work post the error message and show what type the date and time fields are.

mlmcc
1
 

Author Comment

by:eleale
ID: 40342307
In the Suppression formula:
DateTime(Date({FT_PriceQuoteWrk.D040_RateEffDate}), Time({FT_PriceQuoteWrk.D040_RateEffTime})) < CurrentDateTime -1

The error is on the RateEffDate - A date-time is required here.

All the data is in the Table I'm using by default.  So I need to filter on the report.

Thank you.
0
 

Author Comment

by:eleale
ID: 40342315
I forgot to mention the fields types - the Date field is an actual Date type and the Time is a string.

Thanks.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40342384
Try

DateTime({FT_PriceQuoteWrk.D040_RateEffDate}, Time({FT_PriceQuoteWrk.D040_RateEffTime})) < CurrentDateTime -1

If that doesn't work, what format is the time string?

mlmcc
0
 

Author Closing Comment

by:eleale
ID: 40348849
Thank you - that did the trick.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now