Normal
What about this solution:Using string but converting to yyyyMMdd format.Due to the year, then month, then day and the zero padding you will be able to sort in SQL. It's even human readable.....[code]string sDate = String.Format("{0:yyyyMMdd}",DateTime.Now);[/code]and the other way around[code]DateTime dDate = DateTime.ParseExact("20041231","yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture);[/code]This should handle your problem. By converting to C# DateTime before doing any date-time calculations this should work like a charm.What do you think ?;-) Ojo
What about this solution:
Using string but converting to yyyyMMdd format.
Due to the year, then month, then day and the zero padding you will be able to sort in SQL. It's even human readable.....
[code]string sDate = String.Format("{0:yyyyMMdd}",DateTime.Now);[/code]
and the other way around
[code]DateTime dDate = DateTime.ParseExact("20041231","yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture);[/code]
This should handle your problem. By converting to C# DateTime before doing any date-time calculations this should work like a charm.
What do you think ?
;-) Ojo