in C#, DateTime.Day.Now.ToString()
is returning 1
. How can i get it as 01
?
Two quick methods
DateTime.Now.Day.ToString("00"); DateTime.Now.ToString("dd");
Try this:
DateTime.Now.Day.ToString("00");
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