Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Crystal Report - How to select Today's date and cu Post Reply Post New Topic
Author Message
HEMREDDY
Newbie
Newbie


Joined: 31 Jul 2013
Online Status: Offline
Posts: 38
Quote HEMREDDY Replybullet Topic: Crystal Report - How to select Today's date and cu
    Posted: 27 Nov 2013 at 10:30am
Hi,
 
How to select records between Today's date and current time - 15 min in Selection Expert?
 
Say the current date and time is 11/27/2013 12.00.00, i want a report to geerate a report showing all records between 11/27/2013 11.45.00 and the current date and time 11/27/2013 12.00.00.
 
Hem Reddy
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 27 Nov 2013 at 11:54am
I think you would want a formula something like this:
datediff("m",{somedatetimefield},currentdate) <= 15
IP IP Logged
lolly54
Groupie
Groupie
Avatar

Joined: 25 Sep 2011
Online Status: Offline
Posts: 58
Quote lolly54 Replybullet Posted: 03 Dec 2013 at 10:03pm
Try adding these two formulas:

Formula 1: ReportTo
currentdatetime

Formula 2: ReportFrom
dateadd('n', -15, {@ReportTo})

You only need to determine the {@ReportTo} date time. {@ReportFrom} will always return a datetime value 15 mins prior to {@ReportTo}.

Then, in your selection section, simply put:
{Record.Open_date} in {@ReportFrom} to {@ReportTo}

Hope this will work for you! :)


Edited by lolly54 - 03 Dec 2013 at 10:06pm
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.