Incorporate datetime handling