datetime validation fix