Sie Ste

Sie Ste

  • NA
  • 196
  • 185.1k

C# format date

Sep 27 2012 12:38 PM
In a C# 2008 application, I will obtain the current date by using  the statement:

DateTime.Now;

I want to read from a file that is in part of the directory path of:

mm_dd_yy. Or in other words the format is: 09_27_12. 

Thus can you tell me how to change the date obtained from datetime.now and make it look like: 09_27_12?



Answers (1)