omeriqbal2009 Ответов: 1

Получить мобильный ток как получить дату и время в формате 12/24 .дата и время, например, 17 апреля 2020 года - 1:15 вечера.


<pre>Good Day! i want some help how can i get the mobile current datetime with the 12/24 format .Date and time e.g. April 17, 2020 - 1:15 PM. The date and the time should conform to the preferences the user has set on the device.Any one can help me with this.I need this in xamarin Forms.Thanks


Что я уже пробовал:

Response.Write("With Seconds" + "<br />");
    Response.Write("12 Hour Date Format : " + DateTime.Now.ToString("hh:mm:ss tt") + "<br />");
    Response.Write("24 Hour Date Format : " + DateTime.Now.ToString("HH:mm:ss tt") + "<br />");
    Response.Write("Without Seconds" + "<br />");