swift get a date from Date object code example Example: How to create a Swift Date object let currentDateTime = Date()