Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 5th, 2006, 08:09 AM
Registered User
 
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to rjkulkarni2001 Send a message via AIM to rjkulkarni2001 Send a message via MSN to rjkulkarni2001 Send a message via Yahoo to rjkulkarni2001
Default duration between dates

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

 
Old January 5th, 2006, 07:19 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
days-from-duration Dinghus XSLT 1 November 21st, 2007 04:05 AM
seconds-from-duration outspaced XSLT 2 April 3rd, 2007 08:51 AM
date duration in dotnet rjkulkarni2001 Classic ASP Basics 1 January 5th, 2006 07:06 PM
visitor duration per page esemerda Pro PHP 2 September 8th, 2005 01:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.