code: def formatDateParms(context, date_id):
      
      from_date = context.REQUEST.get('%s_fromdate' % date_id, None)
      to_date = context.REQUEST.get('%s_todate' % date_id, None)
  
      date_parms = {}
      if from_date and to_date:
          date_parms = 'from %s to %s' % (from_date, to_date)
      elif from_date:
          date_parms = 'from %s' % (from_date)
      elif to_date:
          date_parms = 'to %s' % (to_date)
  
      return date_parms
docs: Obtain and reformat the from and to dates
          into a printable date parameter construct