strTableName Data :
time (field)
10/29/2014 12:05:52 AM
10/28/2014 12:15:51 AM
10/27/2014 7:52:48 PM
10/26/2014 7:52:48 PM
iwant to delete 27 and 26 data
txtLastDate =10/29/2014 12:05:52 AM
txtDate = Format(txtLastDate - 2, "yyyy-mm-dd hh:mm:ss")
DoCmd.RunSQL "DELETE * FROM " & strTableName & " WHERE time < '" + txtDate + "'"
error : Data Type mismatch in criteria expression.
can anyone Help me .. how is the correct writing .
any suggestions?
Thanks