On one device I got the date format as
dd-mm-yyyy while on the other I got
But I have declared the format as
dd-mm-yyyy. Then why I am getting different format in other device? I want the same format in every device.
How can I get the same date format in different devices?
I think you should set the CultureInfo first. This is a class provided by .NET and it carries about how the date and number should be displayed referring to info in object from that class. For more info check out the link https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo?view=netcore-3.1