Using C# DateTime, I’d like to subtract a time past 0 (or midnight). However, I get an error when doing so. I’m trying to create a timeline where you can zoom in and out and scroll through the times. I get the following error: “The added or subtracted value results in an un-representable DateTime.”
I guess DateTime doesn’t know how to wrap back around from 0 to 23? How do I get around this?
If you subtract a
TimeSpanfrom aDateTime, it will “wrap around” past midnight: