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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Current Date Formulas 1

Status
Not open for further replies.

BlueCandyEyes

Technical User
Mar 13, 2001
3
0
0
US
I am trying to get the report to refresh when I open it up, what would be the correct formula to use if I wanted to use the current date w/o changing it everyday manually?

Right now I am using {CALLLOG.RECVDDATE} = "CurrentDate"
/\
(field to report)
{CALLLOG.RECVDDATE} = "2001-03-13" works fine

It does not bring in anything, if i put in a date it brings in the information for that day, it is looking for matching information in that field... so = is probably not the correct expression... what would it be?
 
The problem is that your date field isn't really a date. It is a character string. The Current Date function only works with true date fields. You have to convert the Character to a true date.

Try:

Date(
Val({CALLLOG.RECVDDATE} [1 to 4] ),
Val({CALLLOG.RECVDDATE} [6 to 7] ),
Val({CALLLOG.RECVDDATE} [9 to 10]) )
= currentDate Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top