New version of get_datetime to extend functionality