adding support for converting Dates to Long