iphone - convert time string to date format in ios swift -
i trying convert time string dateformat.i have tried following code.but not getting output.please me solve this.
let dateformatter = dateformatter() let str = "12:30 am" dateformatter.dateformat = "hh:mm a" let cr = dateformatter.date(from: str) print(cr)
and output "1999-12-31 19:00:00 +0000"
Comments
Post a Comment