I need to format current DateTime in this format dd-mm-yyyy-hh-mm-ss and don't know how to do it. I read on Internet and then write this code:
DateTime saveNow = DateTime.Now;
MessageBox.Show(String.Format("{0:u}", saveNow));
But this returns the date on this format:
2013-04-24 23:11:34Z
Can any help me? I need the first format to append to a file name I'm creating.
DateTime.Now.ToString("dd-MM-yyyy-hh-mm-ss")
More info here
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