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

If-then-else Empty Date Field 1

Status
Not open for further replies.

Bennie47250

Programmer
Nov 8, 2001
515
US
I have an If Then Else statement that is for a date field. For the else part of the formula I would like to put in a blank something like ToText(“”) but Crystal throws the error “A date-time is required here.

Ultimately this is being exported to Excel, when it is opened in Excel I would like to see a blank field rather than anything else

Any tips how I can get a blank field when the else part of the statement is used.
Thanks
 
You'll have to convert the date to text in order to do this - I believe Excel will still see it as a date. It would look something like this:

ToText({date field}, 'MM/dd/yyyy')

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
hilfy,

Thought I tried that yesterday and Excel did still treated it as a date field. However today I used "...then toText({MyField.MyTable},"M/dd/yy') else"" and Excel is seeing the field as text so mission accomplished.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top