|
-
Oct 18th, 2006, 06:05 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Compare two dates
hi guys! is there any way for me to compare two dates exlcuding the seconds? DD/MM/YYYY HH:MM
-
Oct 18th, 2006, 08:16 AM
#2
Re: Compare two dates
Use DateTime.Compare()
When passing it the datetimes to compare, set the seconds to 00. Another way would be to create two new datetime variables by extracting the year, month, day, hour and minute from the originals and comparing them.
-
Oct 18th, 2006, 05:48 PM
#3
Re: Compare two dates
I'd go with mendhak's first suggestion. To get a Date object equivalent to another Date object less the seconds use:
VB Code:
myDate.AddSeconds(-myDate.Seconds)
-
Oct 18th, 2006, 06:31 PM
#4
Thread Starter
Fanatic Member
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
|