date string needed

  • Thread starter Thread starter rodchar
  • Start date Start date
R

rodchar

hey all,

i'd like a string of today's date in the following format:
mmddyy

and here's how i did it:
String directoryName = DateTime.Now.Month.ToString() +
DateTime.Now.Day.ToString() + DateTime.Now.Year.ToString().Substring(2);

is there an easier way?

thanks,
rodchar
 
Note that MM differs from mm. MM = month, mm = minute. Someone where I
work hard coded time formats rather than using the system format (no idea
why), but to make things worse he encoded them all hh:ss - so we had what
looked like end times that were before start times :-)
 
Back
Top