?
Solved

Datediff help in coldfusion

Posted on 2008-06-16
1
Medium Priority
?
206 Views
Last Modified: 2012-05-05
need help with using datediff

I have a form with two dates that a user enters and I need to store the amount of days in between the two dates in a variable.

form.date1
form.date2

How would I accomplishes this?
0
Comment
Question by:sonicimpulse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 36

Accepted Solution

by:
SidFishes earned 2000 total points
ID: 21796737
<cfset form.date1 = "06/10/2008">
<cfset form.date2 = "06/18/2008">

<cfset diff = datediff("d", form.date1, form.date2)>

<cfoutput>The Difference is: #diff# days</cfoutput>
0

Featured Post

Quick Cloud Training

Looking for some quick training on the cloud in 2 hours or less? Check out these how-to guides in AWS, Linux, OpenStack, Azure, and more!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question