Author: zokissima | Posted on: 10/31/2008 10:26:44 AM | Views : 347

Ok, well I'm facing a wall with this one...

 I have some code that parses dates from a file dump, and compares them to the current day +1 one month. Anything within 30 days of current day, gets flagged. That is the background.

Last night, I was running the following code to get a date one month from now:

Dim d3 As Date = (New Date(Date.Today.Year, IIf(Date.Today.Month + 1 > 12, Date.Today.Month + 1 - 12, Date.Today.Month + 1), Date.Today.Day, Date.Today.Now.Hour, Date.Today.Now.Minute, Date.Today.Now.Second))

It worked just fine, up to last night. No code changed whatsoever, but now, when I try to run it, I get an error stating "Year, Month, and Day parameters describe an un-representable DateTime.

 I have tried altering the code to the following:
Dim temp AsGo to the complete details ...