then month:=strtoint(copy(maskedit1,text,5,1)) //maskedit1.text,  是 . 不是 , 

解决方案 »

  1.   

    是啥是啊
    copy函数的第一个参数是一个字符串, 你把maskedit1控件放进去做什么
    都跟你说了把 then month:=strtoint(copy(maskedit1,text,5,1)) //maskedit1,text 改 maskedit1.text
      

  2.   


    if copy(maskedit1.Text,6,1)=''//若月份第二位是空,则只取第一位
          then month:=strtoint(copy(maskedit1,text,5,1)) // 看到了没有,是 maskedit1.text,而不是 ,
          else month:=strtoint(copy(maskedit1.text,5,2));
          case month of
            1,3,5,7,8,10,12:days:=31;
            4,6,9,11:days:=30;