How to write a method to accept any type of date format and convert it to format we need.

How to write a method to accept any type of date format and convert it to format we need so that I can pass it to UI.
I am getting date as yyyy-mm-dd and I need to convert it into dd mmm yyyy Ex: I am getting date as 2019-06-13 from API I need to convert it into 13 Jul 2019 and pass it to UI. I am a beginner to xamarin.

Tagged:

Best Answers

Answers

  • subramanyamnuggusubramanyamnuggu Member ✭✭✭

    When testing on some mobile when we select the date its giving in the format of dd/mm/yyyy and for some mobiles its giving in dd-mm-yyyy format. So when we follow one format and when we select the date and if the format is different the app is getting out of that page.

  • subramanyamnuggusubramanyamnuggu Member ✭✭✭

    HI @LeonLu

    why the above method is automatically giving month as JAN for whatever the month date when converted to dd MMM yyyy in the above example.

Sign In or Register to comment.