2 Replies Latest reply on May 17, 2006 5:27 PM by Dan Bracuk

    getting records older than 30 days from the current date

    TESS_GEAR
      I am using MS SQL 2000 how can I fetch the data which are older than 30 days from the current date? i set currendate field to "datetime" as a data type and length is "8"

      <cfset variables.getdate = DateAdd('d',-30, now())>

      select dataname
      from tabletest
      where currendate >= 'variables.getdate'

      the above sql stmt does not work.