Solved

Datediff help in coldfusion

Posted on 2008-06-16
1
199 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now