Subject: duration between dates
Posted By: rjkulkarni2001 Post Date: 1/5/2006 7:09:11 AM
hello,
i want to find the duration between two dates, and it should be in format as given below,
date1:12/12/2005  dd/mm/yyyy format
date2 :12/01/2006
then duration should be difference of two dates
and format like
0 years,1 month 0 days


thank u

Reply By: mat41 Reply Date: 1/5/2006 6:19:29 PM
Please do not cross post:

http://p2p.wrox.com/topic.asp?TOPIC_ID=38322

Your other post asks for a 'in asp.net with vb.net code behind' solution - what exactly are you after?

If its classic ASP/VBScript you could use the dateDiff function:

------------cut n paste code-----------------
<%
  dim dateOne,dateTwo
  dateOne = "12/12/2005"
  dateTwo = "12/01/2006"
  response.write DateDiff("yyyy", dateOne, dateTwo) & " Years, " & DateDiff("m", dateOne, dateTwo) & " Months, " & DateDiff("d", dateOne, dateTwo) & " Days"
%>
---------------------------------------------

Wind is your friend
Matt

Go to topic 38304

Return to index page 402
Return to index page 401
Return to index page 400
Return to index page 399
Return to index page 398
Return to index page 397
Return to index page 396
Return to index page 395
Return to index page 394
Return to index page 393