Skip to content

Instantly share code, notes, and snippets.

@nastanford
Created October 27, 2014 17:51
Show Gist options
  • Save nastanford/fcf4a42c03306e09be71 to your computer and use it in GitHub Desktop.
Save nastanford/fcf4a42c03306e09be71 to your computer and use it in GitHub Desktop.
ColdFusion DateDiff() Bug Fixed
<cfoutput>
<cfset thedate = '2014-10-30 00:00:00.0'>
Exam Date:
#DateFormat(examdate,'mm/dd/yyyy')#<br />
Today's Date:
#DateFormat(now(),'mm/dd/yyyy')#<br />
DateDiff:
#DateDiff('d',CreateDate(year(now()),month(now()),Day(now())),DateFormat(CreateDate(year(thedate), month(thedate), Day(thedate)),'mm/dd/yyyy'))#
<br />
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment