code: def str_dateStrip(astr_datestr, astr_sep='/'):
    
    try:
      index = astr_datestr.index(astr_sep)
    except:
      return astr_datestr.encode('ascii')
  
    try:
      tm = time.strptime(astr_datestr, '%d/%M/%Y')
    except:
      try:
        tm = time.strptime(astr_datestr, '%d/%M/%y')
      except:
        error_exit('str_dateStrip', 'parsing date string',
                   'no conversion was possible', 1)
    tstr = time.strftime("%d%M%Y", tm)
    return tstr.encode('ascii')
docs: Simple date strip method. Checks if the <astr_datestr>
    contains <astr_sep>. If so, strips these from the string
    and returns result.
  
    The actual stripping entails falling through two layers
    of exception handling... so it is something of a hack.