validate datetime format