The odd thing is happening here. The following code:
String(Int(date.timeIntervalSince1970*1000))
works on the playground, but not in the classroom. It crashes with EXC_BAD_INSTRUCTION.
Any ideas why? Alternatively, how do I get a string from the above NSTimeInterval?
Thanks in advance!
Edit: I need the result as Int, therefore 1402324472549, not 1402324472549.64, for example.
source
share