convert datetimes to date for proper calculation [master]

Resolves #876 for master