I’m using dateString = date.strftime('%Y-%m-%d %H:%M:%S.%f') on this date: 2012-06-28 16:11:17 which returns 2012-06-28 16:11:17.999771 which for some reason is unparseable by Objective-c. How can I limit the last part of the string to 3 decimal places rather than 6?
I’m using dateString = date.strftime(‘%Y-%m-%d %H:%M:%S.%f’) on this date: 2012-06-28 16:11:17 which returns 2012-06-28
Share
Use:
This is slicing (syntax [from : to(but but not include) : step]):