checking the format of date values