string strFormattedDate = string.Format("{0:yyyy-MM-dd}",DateTime.Now);
string.Format takes [format and string literals], [params[] of variables]
And within the first format part, {0} refers to the first parameter.. so for
example:
string.Format("{0}, {1}, {0}, {2}", "Hello", "There", "You");
would result in:
Hello, There, Hello, You
Lastly, within the {0}, you can specify formatting things - like datatype,
precision and like above - the format. Do a search for string.Format to get
all the formatting rules..
HTH
"raisin" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
is there an easy way of making a date appear in this
format:
yyyy-mm-dd
?
thank you