Skip to content

Instantly share code, notes, and snippets.

@kristofclaes
Created September 6, 2011 12:54
Show Gist options
  • Save kristofclaes/1197460 to your computer and use it in GitHub Desktop.
Save kristofclaes/1197460 to your computer and use it in GitHub Desktop.
Look at the code I have to work with...
DateTime date = Convert.ToDateTime(xn["date"].InnerText);
string dateString;
dateString = date.Day + "-";
if (date.Month < 10)
{
dateString += "0";
}
dateString += date.Month + "-" + date.Year;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment