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