Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

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

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

    Add comment
    10|10000 characters needed characters exceeded