cast timeparts to int when using checkdate