Solved

Datediff help in coldfusion

Posted on 2008-06-16
1
202 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
1 Comment
 
LVL 36

Accepted Solution

by:
SidFishes earned 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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 …
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

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