Handling datetime type