getting date properly