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

Use Function as String 1

Status
Not open for further replies.

brizaybrizoke

Technical User
Jul 21, 2011
25
US
Is it possible to use a function (i.e. printdate) in place of a string?

My formula attempt,

if {@Rel Date} <> printdate then crRed

Formula Editor wants a string because I'm using the <> operation but I want said string to equal the printdate without having to enter a specific date/number.

Thanks in advance to any advice!
 
I'm surprised it's not working. Where are you doing it? And what version of Crystal?

Currentdate should be usable everywhere.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Is {@Rel Date} a date field? If not you will need to type:-

If date({@Rel Date})<>printdate then crRed

Thanks,

Annette
 
I'm using Crystal 8.5 and {@Rel Date} is a date field.

I used the formula you suggested Annette and it worked!

Thank you both so much for your comments :)
 
I think Crystal must classify your field as a string, even though it contains a date. More recent versions show what the field is classified as: I'm not sure if 8.5 does.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top