1
Reply

C# format date

Sie Ste

Sie Ste

Sep 27 2012 12:38 PM
1.1k
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)