7 Replies Latest reply on Oct 26, 2009 8:49 AM by djkhalif

    The value '' cannot be converted to a number: Help anyone

    djkhalif Level 1

      Good morning all,

       

      I have this query below, it works fine when I select a start date with a single digit day, ie. 9/7/2009. But any selected start date after the week containing 9/7/2009 I get this error:

      The value '' cannot be converted to a number

       

       

       

      SELECT     DATEADD(wk, DATEDIFF(wk, 0, DateProd), 0) AS Weekly_Production, sum(UnitsProd) AS Total_Units
      FROM         tbl_Assembly_Production
      WHERE dateProd Between '#FORM.dateFROM#' and '#FORM.dateTo#'
      GROUP BY DATEADD(wk, DATEDIFF(wk, 0, DateProd), 0)
      ORDER BY Weekly_Production

       

       

      Has anyone seen this before? I've checked my table and all the dates seem good.

       

      Thanks in advance,

       

      djkhalif