That's 13/12/2015 in Hijri, 35 means 1435 in Hijri, the default date format for Saudi Arabia.
String.format() DateTime With Arabic culture
-
03-06-2022 - |
Question
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
Solution
OTHER TIPS
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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow