Post

Replies

Boosts

Views

Activity

How to get current time
I'm new to Xcode and want to know how to get the current time as a variable or constant (specifically the current hour and minute). I've tried using Date(), which is what most websites told me to use, but it doesn't seem to work. what do I need to type to get the time?
1
1
2.1k
Jun ’21