What is the quickest way to convert a DateTime to a int representation of the format yyyyMMdd.
i.e. 01-Jan-2007 --> 20070101 (as in int)?
int result = int.Parse(myDate.ToString("yyyyMMdd"));
int x = date.Year * 10000 + date.Month * 100 + date.Day
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With