Quantcast
Channel: Adobe Community : Discussion List - ColdFusion
Viewing all articles
Browse latest Browse all 6243

Date changed to default value when returned from IIF function

$
0
0

Hi,

 

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

 

Thanks.

 

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

 

<cfoutput>

  vNow = #vNow# <br />

</cfoutput>

 

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

 

<cfoutput>

  vDate = #vDate# <br />

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

</cfoutput>


Viewing all articles
Browse latest Browse all 6243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>