As you probably know, you can setup date format in the Settings of an Android device.
In code how do we make sure that we use that format for date display?
The default date format shows as YYYY-MM-DD.
Windows 10In the search box on the taskbar, type control panel, and then select Control Panel. Click Regional and Language Options. In the Region dialog box, click Additional settings. Click the Date tab.
By default, Microsoft Windows 10 and 11 use dd/mm/yyyy for dates and a 12-hour format for time.
First, pick the cells that contain dates, then right-click and select Format Cells. Select Custom in the Number Tab, then type 'dd-mmm-yyyy' in the Type text box, then click okay.
Try android.text.format.DateFormat
, notably getDateFormatOrder()
to get the user's preferred date format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With