I am having trouble removing the leading zero from the date I found on the miscrosoft website.
DateTime date1 = new DateTime(2008, 8, 18); Console.WriteLine(date1.ToString("(M) MMM, MMMM", CultureInfo.CreateSpecificCulture("en-US")));
Totally not working here.
This is my code:
string date = '2013-04-01' DateTime billrunDate = Convert.ToDateTime(date); string test = billrunDate.ToString("M");
Now test 01 April
I just need it to be 4 per line or int idc Thanks!
Change if I do:
billrunDate.ToString("(M)");
I get (4) but I don't need ()
EDIT 2: Well, it works
string test = billrunDate.ToString(" M "); string testTwo = test.Trim();
Very ugly
source share