wtf?
-
For some reason DateTime.DaysInMonth(2008, 4) returns 31, yet DateTime.Parse("2008-04-31") yields in a FormatException.. am i missing something here? or is this some sort of bug.
damianrda wrote:
am i missing something here?
Yeah, how to create a subject line that is meaningful and descriptive.
only two letters away from being an asset
-
For some reason DateTime.DaysInMonth(2008, 4) returns 31, yet DateTime.Parse("2008-04-31") yields in a FormatException.. am i missing something here? or is this some sort of bug.
Running the line of code you just mentioned returned 30
MessageBox.Show(DateTime.DaysInMonth(2008, 4).ToString()); `Sorry not much help there but I just thought id give you the result of my test. Very strange that it is returning 31 - it doesnt seem possible.`
-
For some reason DateTime.DaysInMonth(2008, 4) returns 31, yet DateTime.Parse("2008-04-31") yields in a FormatException.. am i missing something here? or is this some sort of bug.
Aside from the bad subject line, I'd say your problem is that its parsing your date assuming a YYYY-DD-MM format.
-
Running the line of code you just mentioned returned 30
MessageBox.Show(DateTime.DaysInMonth(2008, 4).ToString()); `Sorry not much help there but I just thought id give you the result of my test. Very strange that it is returning 31 - it doesnt seem possible.`
Yeah, I assumed he fat fingered the date and meant March, but if you're talking about April - yeah...that's a problem ;D
-
For some reason DateTime.DaysInMonth(2008, 4) returns 31, yet DateTime.Parse("2008-04-31") yields in a FormatException.. am i missing something here? or is this some sort of bug.
damianrda wrote:
am i missing something here?
Yes what Mark said and the fact that those two methods you posted have nothing to do with each other so your post is like saying, for some reason you can eat potatoes yet jumping off a building will hurt you.
led mike
-
damianrda wrote:
am i missing something here?
Yes what Mark said and the fact that those two methods you posted have nothing to do with each other so your post is like saying, for some reason you can eat potatoes yet jumping off a building will hurt you.
led mike