RIAS
asked on
Get month and date in a format
Hello,
How can I get a string with current month and date in this format :
"Mar 10"
Cheers
How can I get a string with current month and date in this format :
"Mar 10"
Cheers
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There is also a DateTime.ToString() overload that accepts the format and a provider, which would allow to you format it without changing Thread.CurrentThread.Curre ntCulture:
https://msdn.microsoft.com/en-us/library/8tfzyc64(v=vs.110).aspx
So it could be:
https://msdn.microsoft.com/en-us/library/8tfzyc64(v=vs.110).aspx
So it could be:
Console.WriteLine(thisDay.ToString("MMM dd", New CultureInfo("en-US")))
ASKER