Hi guys! This is my first time to use a recordselectionformula on Crystal Reports 10. I get this error that the date-time is required and it points me to this code:

VB Code:
  1. AnAccountReport.RecordSelectionFormula = "{Account_Code.Account_Code} >= '" & Trim(Text1.Text) & "' and" _
  2.         & "{Account_Code.Account_Code} <= '" & Trim(Text2.Text) & "' and " _
  3.         & "{GL_Table.Date} >= '" & Format(DTPicker1.Value, "MM/dd/yyyy hh:mm:ss") & "' and " _
  4.         & "{GL_Table.Date} <= '" & Format(DTPicker2.Value, "MM/dd/yyyy hh:mm:ss") & "' and " _
  5.         & "{GL_Table.Date} >= DateTime (2004, 08, 1,00, 00, 00) " _
  6.         & "and " _
  7.         & "if {GL_Table.Date} = '" & Format(DTPicker1.Value, "MM/dd/yyyy hh:mm:ss") & "' then " _
  8.         & "{GL_Table.Entry_Type} <> 'BB' " _
  9.         & "Else " _
  10.         & "{GL_Table.Entry_Type} <> ''"

Is there something wrong?