fromDatabaseValue(_:)

Creates an Date with the specified database value.

Date.swift:64
static func fromDatabaseValue(_ dbValue: DatabaseValue) -> Date?

If the database value contains a number, that number is interpreted as a timeinterval since 00:00:00 UTC on 1 January 1970.

If the database value contains a string, that string is interpreted as a SQLite date in the UTC time zone. Nil is returned if the date string does not contain at least the year, month and day components. Other components (minutes, etc.) are set to zero if missing.

Otherwise, returns nil.