|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Hi!
How to calculate the date difference ? eg : (20-10-2004) - (01-04-1080) it should display the day month and the year...! |
|
#2
|
|||
|
|||
|
Look at the datediff function.
example code: Dim strdate1 As String Dim strdate2 As String strdate1 = "10/15/1965" strdate2 = "10/21/2004" Dim strDiff As String strDiff = DateDiff("d", strdate1, strdate2) strDiff will equal 14251, the number of days between the two dates. now you have to calculate the years, months and days if that is what you need. I am not sure if there is a function that will do that. Maybe this will help a little. |
|
#3
|
|||
|
|||
|
Thanx for u r reply
I tried the function..! thanx. If you get any function Pleae reply to this thread.
Arjun. |
|
#4
|
|||
|
|||
|
And why is a "d" in the argurment. what interval..?
|
|
#5
|
|||
|
|||
|
The documentation tells you about the arguments (vb6)
http://msdn.microsoft.com/library/e...fctDateDiff.asp
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Date function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|