Reputation: 855
check the below code snippet,
namespace TestDateConvertion
{
class Program
{
static void Main(string[] args)
{
DateTime testValue = new DateTime(2013, 12, 15, 15, 33, 44);
CultureInfo culture = new CultureInfo("ar-SA");
string stringValue = string.Format(culture, "{0:d} {0:HH:mm:ss}", testValue);
Console.WriteLine(stringValue);
Console.ReadLine();
}
}
}
It gives the output as
22/02/35 15:33:44
I am not getting how this is possible. whats the 35 doing in output there
Upvotes: 2
Views: 5895
Reputation: 21
Is not a part of you year ?
I you try string.Format(culture, "{0:dd MM yyyy} {0:HH:mm:ss}", testValue);
, you will receive 12 02 1435 15:33:44
Upvotes: 1
Reputation: 3724
That's 13/12/2015 in Hijri, 35 means 1435 in Hijri, the default date format for Saudi Arabia.
Upvotes: 5