Hi all,
here is a simple question.
How would you get a C# STRING representing the current time in the following format:


I am currently using DateTime.Now but that gives me something like this:

8/13/2009 12:57:47 PM

So I want to
1) remove the houre (I need date only)
2) replace " / " with " - "
3) rearange based on YYYY-DD-MM
4) Convert to STRING type

Can someone get me started?

If I got what you were asking I think should work:

(DateTime.Now.Year + "-" + DateTime.Now.Day + "-" + DateTime.Now.Month).ToString();

For example, on Thursday, August 13, 2009 it returns: 2009-13-8

Hope this helps you,
Johnny Goodlad