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

Null Date

Status
Not open for further replies.

77walker

Technical User
Feb 7, 2008
33
US
I am running crystal xi and I have a datetime field that I have formatted to display only the year. I have some records that have a null date and I would like to display that group heading either as "YYYY" or show a string of "No Date". This is the formula I am trying to use:
if not isnull({incident.alarmdate}) then Year ({incident.alarmdate}) else "No Date"
I get the following error: A number is required at "No Date".

Can someone tell me what I am doing wrong with this formula?
 
YOu can not have mixed data types in an If.. then ..else

Try

if not isnull({incident.alarmdate}) then totext(Year ({incident.alarmdate}),0,"") else "No Date"

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top