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!

Instances only for the date the report is ran?

Status
Not open for further replies.

gennaroalpha7

Technical User
Nov 28, 2012
253
US
Hello,

I need to run a report, but the report can only contain records (incidents) for the day the report is ran. How would the formula be structured? I don't do this sort of thing everyday that is why I am asking for help. Thanks in advance for your help.

Here are the field(s): "CallLog.RecvdDate (string)"

Thanks. :)

 
without knowing how your date data is stored (ie: YYYYMMDD, MMDDYY, as seconds since 1960, etc) the below is just a guess. the example assumes a database value for your field of YYYYMMDD. If your database stores the date differently, it will need to be modified.

//{@CallDate}
IF isnumeric({CalLLog.RecvdDate})=TRUE then
dateserial(val(LEFT({CallLog.RecvdDate},4)),val(MID({CallLog.RecvdDate},5,2)),Val(RIGHT({CalLLog.RecvdDate},2))) else dateserial(1900,01,01);

In your select expert, you can then set the formula {@CallDate} equal to currentdate


As is usually the case, i do not have crystal in front of me and apologize in advance for any mistakes, misunderstandings and /or typos.
 
Hello fisheromacse,

The date prints out in this manner....

e.g., 2013-01-27

Thank you.
 
i think this will be close:

dateserial(val(LEFT({CallLog.RecvdDate},4)),val(MID({CallLog.RecvdDate},6,2)),Val(RIGHT({CalLLog.RecvdDate},2))) else dateserial(1900,01,01);
 
oops. should have been:

dateserial(val(LEFT({CallLog.RecvdDate},4)),val(MID({CallLog.RecvdDate},6,2)),Val(RIGHT({CalLLog.RecvdDate},2)))
 
Hi fisheromacse,

I was drilling and I came up with this.

{CallLog.RecvdDate} = "currentdate"

could this perhaps function?

thanks.
 
Hi,

When I enter your formula I recieve...

'The result of Selection Formula must be a boolean'
 
Hi,

When I follow your (below) suggestion I am recieving more than 8k records. I only want records for the date that it's run.

dateserial(val(LEFT({CallLog.RecvdDate},4)),val(MID({CallLog.RecvdDate},6,2)),Val(RIGHT({CalLLog.RecvdDate},2))) = currentdate

could there be another way?

Thx.
 
I think the suggested approach is unnecessarily complicated, although to be honest it looks to me like it should have worked. Try this:

Code:
Date({CallLog.RecvdDate}) = CurrentDate

Cheers
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top