From the debugger it shows that the date string is "2017-08-01 00:00:00" and I passed the correct format too. But the dateFormatter.date part always fail (return nil) for 1 device. But some its working for simulator and other iphone devices. Im using swift3
Try to set your locale:
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
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