熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Delphi編程 >> 正文

判斷字符串是否為日期或時間[2]

2022-06-13   來源: Delphi編程 
    ——此文章摘自《Delphi開發經驗技巧寶典》定價 特價 購買>>

             LabelCaption:=只是字符串;
             end
             else
              LabelCaption:=只是字符串;
          end
          else
            LabelCaption:=只是字符串;
       end
       else
        LabelCaption:=只是字符串;
     end;
     if Length(EditText)= then
     begin
       if StrToInt(Copy(EditText))> then
       begin
        if Copy(EditText)= then
        begin
         if StrToInt(Copy(EditText))<= then
          begin
            if Copy(editText)= then
             begin
               if StrToInt(Copy(EditText))> then
                begin
                  p:=StrToInt(Copy(EditText));
                  if StrToInt(Copy(EditText))<=a[p] then
                    labelCaption:=是日期型字符串
                  else
                    LabelCaption:=只是字符串;
                end
                else
                  LabelCaption:=只是字符串;
              end
              else
                LabelCaption:=只是字符串;
           end
           else
             LabelCaption:=只是字符串;
        end
        else
          LabelCaption:=只是字符串;
      end
      else
        LabelCaption:=只是字符串;
     end;
     if (Length(EditText)=)and(Copy(EditText)=:) then
     begin
       if StrToInt(copy(EditText))<= then
       begin
         if StrToInt(copy(EditText))<= then
         begin
           if Copy(EditText)=: then
           begin
             if StrToInt(Copy(EditText))<= then
               LabelCaption:=是時間型字符串
             else
               LabelCaption:=只是字符串;
           end
           else
             LabelCaption:=只是字符串;
         end
         else
           LabelCaption:=只是字符串;
       end
       else
         LabelCaption:=只是字符串;
     end;
     end
     else
      LabelCaption:=只是字符串;
    end;

[]  []  


From:http://tw.wingwit.com/Article/program/Delphi/201311/24880.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.