Skip to Content
0

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

Apr 18, 2017 at 04:14 PM

34

avatar image
Former Member

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'.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Apr 19, 2017 at 04:58 AM
0

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")

Share
10 |10000 characters needed characters left characters exceeded