|
Finding the difference between date
| Language: |
ASP |
    
Rated by 2 Users
1 Star = Horrible 5 Stars = Perfect
Rate Code Now
|
| Posted By: |
Blake |
| Author Website: |
Differences between ASP and PHP |
| Posted On: |
6/28/2007 |
| Code Views: |
2763 |
This code will find the difference between two dates, either in months, quarters, or days.
|
<% dim myOutput, myDate1, myDate2, myDiffType
'This will output the difference between two dates '---- 'output the difference in: myDiffType = "m" ' m = months ' q = quarter ' d = day '---- 'Input the dates (format: dd/mm/yyyy): myDate1 = "01/25/1999" myDate2 = "01/25/2005"
myOutput = DateDiff(myDiffType,myDate1,myDate2)
'now display the result: response.write(myOutput) response.end 'this ends the server processing
%>
View code in Textarea
This code has not been tested by Your WebCode. Use it at your own risk.
Please report any copyright violations.
|
|