Fix cutting length of datetime for MSSQL