G
Guest
DateTime.Compare is always returning -1. What am I doing wrong?
Dim today As DateTime = DateTime.Now
Dim temp As Integer
Dim endPeopleRegDate As DateTime
endPeopleRegDate = Convert.ToDateTime("10/5/2005 23:59:59")
temp = DateTime.Compare(today, EndPeopleRegDate)
today = Date.Now.AddMonths(1)
temp = DateTime.Compare(today, EndPeopleRegDate)
today = Date.Now.AddMonths(-5)
temp = DateTime.Compare(today, EndPeopleRegDate)
Dim today As DateTime = DateTime.Now
Dim temp As Integer
Dim endPeopleRegDate As DateTime
endPeopleRegDate = Convert.ToDateTime("10/5/2005 23:59:59")
temp = DateTime.Compare(today, EndPeopleRegDate)
today = Date.Now.AddMonths(1)
temp = DateTime.Compare(today, EndPeopleRegDate)
today = Date.Now.AddMonths(-5)
temp = DateTime.Compare(today, EndPeopleRegDate)