1 Reply Latest reply on Sep 24, 2014 2:13 PM by aghanchi

    Date changed to default value when returned from IIF function




      can anyone please explain why the vDate is being displayed as a decimal number in the following code. It seems that the IIF() functions returns  some default value and not what I set




      <cfset vNow = DateFormat(Now(), "mm/dd/yyyy")>



        vNow = #vNow# <br />



      <cfset vDate = iif(true,  vNow, "")>



        vDate = #vDate# <br />

        Formatted vDate = #DateFormat(vDate,"mm/dd/yyyy")# #TimeFormat(vDate, "hh:mm:ss")#