Re: Date Difference
Matthew Wills <[email protected]> Thu, 7 Nov 2002 16:01:51 +1100
| Newsgroups | gmane.comp.windows.devel.vbcom |
|---|---|
| Message-ID | <[email protected]> |
Manik,
http://peach.ease.lsoft.com/scripts/wa.exe?A0=visbas-beginners may be a more appropriate forum for this question.
The short answer is you would need to make multiple calls of DateDiff - one for each period type (seconds / minutes / hours / days / months etc).
Also, don't use Format like that. Use CDate instead.
d1 = CDate("06/08/2002 05:30:00 PM")
d2 = CDate("06/08/2003 05:30:00 PM")
Again, I recommend you sign up at :
http://peach.ease.lsoft.com/scripts/wa.exe?A0=visbas-beginners
or
http://peach.ease.lsoft.com/scripts/wa.exe?A0=visbas-l
Seeya
Matthew Wills @ Deutsche Asset Management
(w) (02) 9249 9366
(h) (02) 9586 3655
(m) 0416 235 016
(work email) [email protected]
(personal email) [email protected]
manikandans@LEARN
ETINDIA.COM To: [email protected]
Sent by: cc:
[email protected] Subject: [VBCOM] Date Difference
ELOP.COM
07/11/2002 15:50
Please respond to
VBCOM
Hi,
How do i find the difference between two dates which contains time
also.. I know that i have to use datediff function. but consider
i have two dates as follows
d1 = Format("06/08/2002 05:30:00 PM", "dd/mm/yyyy hh:mm:ss AMPM")
d2 = Format("06/08/2003 05:30:00 PM", "dd/mm/yyyy hh:mm:ss AMPM")
now the exact difference is 0 days, 0 months and 1 year 0 hours, 0 minutes
and 0 seconds...how can i do this using datediff...or is there some other
way to find out this difference , can anyone help me out in this
thx in advance
Regards
Manikandan
You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
--
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.