added additional datetime handling functions
moved datetime to dates to avoid import conflicts