fix datetime validation