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
Printable View
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
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