0

Math operations

How to multiple age with doubles Theres a date picker and that calculates the age with hours. It displays on a label. I wanna multiply that number with 2. But let ageHours = components.hour Ä°t is not shown as a double or int, how should i make swift detec ageHours as a double or int

22nd Dec 2018, 4:14 PM
Murat
Murat - avatar
1 Answer
0
Have you tried: let ageHours = Double(components.hour) I’m not familiar with the hour function, but Double() works in other applications
8th Sep 2019, 10:19 PM
Benjamin