View previous topic :: View next topic |
Author |
Message |
tim
Joined: 02 Nov 2004 Posts: 5
|
Posted: Tue Nov 02, 2004 10:16 am Post subject: I need help with ASP dates (date difference) |
|
|
Hi all,
I need a little help with APS dates. I have 2 dates in one of my ASP pages, and I want to calculate the difference between the 2 dates in days. How do I do that?
Thank you in advance,
Tim |
|
Back to top |
|
|
administrator Site Admin
Joined: 01 Oct 2004 Posts: 183
|
Posted: Tue Nov 02, 2004 2:47 pm Post subject: |
|
|
Hi Tim,
APS (VBScript) has a function called DateDiff, which returns the difference between 2 dates (you have to specify in what time interval - days, hours, minutes, etc.). Here is how to use it:
Code: |
Response.Write DateDiff("d", "01/01/2004","01/31/2004")
|
The DateDiff code above will display 30 in your browser.
Cheers, _________________ Peter
ASP & ASP.NET Articles and Tutorials |
|
Back to top |
|
|
tim
Joined: 02 Nov 2004 Posts: 5
|
Posted: Tue Nov 02, 2004 4:00 pm Post subject: |
|
|
Thank you!
Tim |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|