Skip to main content

Working on formatting the date in Xcode, and you come across the situation where you need to check or test the date format.  NSDateFormatter is a great site to check your date format string.  I wanted to transform the 2019-08-15 10:34:49+1000 to Aug 15, 12:34 AM.

let dateFormatter = DateFormatter()

dateFormatter.dateFormat = "MMM d, h:mm a"

let dateFormatted = dateFormatter.string(from: run.timestamp!)

dateFormatted prints Aug 15, 12:34 AM

Related articles

Andrew Fletcher16 Aug 2022

How to handle a lost KeyStore password in Android?

If you have a situation where either you have forgotten a Keystore password or change of developers and the password wasn't sent across.... what to do?  However, your app lives on and needs to be updated!   Possible solutions This is a great starting point....
Andrew Fletcher01 Aug 2022

Ionic - Capacitor config​

Initialise your Capacitor config​ To initialise Capacitor use the CLI questionnaire: npx cap init On executing the above command, you will be prompted to answer a few questions for your app such as your app's name and the package ID. [?] What is the name of your app? This should...