changed date converter logic