DateTime format conversion in mobile


I need to get date format as "dd-mm-yyyy", for this i have used a local variable of type date and time inside an input widget. For some mobiles it is working properly as expected("dd-mm-yyyy). But in some mobiles it is showing ("mm-dd-yyyy").

I have to convert the date format to dd-mm-yyyy and time to 24hrs format in mobile to display as same in every mobile. For this Iam using "Date picker widget" . Iam able to assign values  through which the default value will be ("13 jun 2019"), but to convert  i have to use FormatDateTime()  to "dd-mm-yyyy", but I have date and time value in a attribute value.

Can I get "dd-mm-yyyy" format without using "Date Picker"? Please help

Thank You.

Hi Melody,

I can't really help you right now, although I was under the impression that if you configure your inputs to be Date (or Time) they would default to use the native date/time pickers (where the format is more or less irrelevant)...

It's already been two weeks, so hopefully you've found a way to achieve what you wanted, but I do have a question for you:

Why do you have to get date format as "dd-mm-yyyy"? This is one of those configurations the device user sets up and as such good UX practices would dictate you follow whatever conventions the user expects, namely that dates will be in the format they have configured their device for.

Hi Jorge,

Even after changing the Mobile Date Time Format to 24 hrs for some mobile the picker is showing 12 hrs Format only.

Is there any way that we can follow the Device Date Time Format.