cancel
Showing results for 
Search instead for 
Did you mean: 

I am using IF ELSE condition in WebI to display "NA" in date field.

Former Member
0 Kudos

Hi All,

I am writing below condition please check

If (condition='True') then FormatDate(CurrentDate();"MM-dd-yyyy")="NA" else FormatDate(CurrentDate();"MM-dd-yyyy")

But for true condition instead of 'NA' i am getting '0'.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Yes that would definitely come because the code where you say

FormatDate(CurrentDate();"MM-dd-yyyy")="NA"

The Compiler treats it as another condition where it checks if

FormatDate(CurrentDate();"MM-dd-yyyy")

is equals to NA or not which is not s it returns 0

You need to adjust the code as

If (condition='True') then "NA" else FormatDate(CurrentDate();"MM-dd-yyyy")