Fixed index for to datetime and time