I'm trying to compare 2 dates to see if one is greater than another, in traditional asp program, I'm using date diff, DateDiff("d",postDate,orientationdate)
postDate is a string converted to a date,
postDate = "04/27/2010"
postDate = CDate(postDate)
orientationDate is date/time field from an access db
I get a weird result, this is what gets displayed on the page:
postDate = 4/27/2010
col name is orientationDate and its value is 4/20/2010
days diff tween post and odate = -40295
no matter what the access date is, the result is always -40295
it seems one or both dates are in the wrong format for the datediff compare? since I just created the postDate and converted it into date format, it would seem to be the access date?
postDate is a string converted to a date,
postDate = "04/27/2010"
postDate = CDate(postDate)
orientationDate is date/time field from an access db
I get a weird result, this is what gets displayed on the page:
postDate = 4/27/2010
col name is orientationDate and its value is 4/20/2010
days diff tween post and odate = -40295
no matter what the access date is, the result is always -40295
it seems one or both dates are in the wrong format for the datediff compare? since I just created the postDate and converted it into date format, it would seem to be the access date?