 <p>Looks like its a date. You can parse the string to DateTime, using <a href="http://msdn.microsoft.com/en-us/library/system.datetime.parseexact.aspx">DateTime.ParseExact</a> and then use .ToString to return formatted result. </p> <pre><code>DateTime dt = DateTime.ParseExact(temp1, "dd MM yyyy", CultureInfo.InvariantCulture); Console.Write(dt.ToString("yyyy MM dd")); </code></pre> <p><em>You may use that DateTime object later in your code, and also apply different formatting (if you need)</em></p>