Invalid query: Incorrect DATETIME value: 'NA' select invoice_id ,patient_id,first_date_sent,last_date_sent from st_claim_statement_sent_log where first_date_sent != "NA" and datediff(now(),first_date_sent)>=10 and patient_balance>0