|
-
February 4th, 1999, 06:44 PM
#1
compare date in vb?
Hi: there
How can I compare date in vb?
I only compare date not time, it's really trouble that I have to format
long time to date, but I can't comare two string?
any ideal?
thanks
George
-
February 8th, 1999, 03:59 AM
#2
Re: compare date in vb?
Hi
You want to take a look at the DateDiff function in VB. This can be used to give you the specified period between two dates (in either days, weeks, months, quarters, years, minutes, hours etc).
This way you wont have to change your dates to strings to compare them. Obviously with the DateDiff function, if the result is '0' then both dates are identical.
Regards
Chris Eastwood
CodeGuru - the website for developers
http://www.codeguru.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|