如现实为2005-03-30,而不是2005-03-32?
解决方案 »
- 一段代码问题````帮忙看下````在线等ING
- 哈哈,丢掉的分又回来啦!
- 求如何打开网页后自动下载服务器上的Exe文件,到本地并执行!
- 关于消息处理句柄的问题?谢谢!
- 能否把一个.exe文件编译在Delphi的.exe中
- 分享:How do I set username/password for Basic Authentication on SOAP.
- 请教一个问题
- 用TABLE控件已经取得了表的记录,问题是怎样用table取得某个一条字段最大值的记录?
- 怎样判断一个字符串变量是否在combobox的item当中?
- 如何用socket控件在internet通讯??
- 有半年多没写delphi程序了,问问大家现在都用delphi的那个版?????
- 我怎么使程序在不同的分辨率下都能正常显示?
var sRStr,stem1,stem2,stem3,stem4,stem5,stem6,stemH,stemM:string;
iTem:byte;
tin,e:integer;
begin
sRStr:=medtTime.EditText;
// sold:=medtTime.EditText;
stem1:=''; //first
stem1:=Copy(sRStr,1,1);
Val(stem1,tin,e);
if e=0 then
if strtoInt(stem1)<=2 then
begin
stem2:=''; //second
stem2:=Copy(sRStr,2,1); Val(stem2,tin,e);
if e=0 then
if((Strtoint(stem1)<2)and(strtoInt(stem2)<=9))or((Strtoint(stem1)=2)and(strtoInt(stem2)<5))then
begin
stem3:='';
stem3:=Copy(sRStr,4,1);
stemH:=Copy(sRstr,1,2);
Val(stem3,tin,e);
if e=0 then
if (strtoint(stemH)<25) and (strtoInt(stem3)<1) or (strtoint(stemH)<24) and (strtoInt(stem3)<6) then
begin
stem4:='';
stem4:=Copy(sRStr,5,1);
Val(stem4,tin,e);
if e=0 then if (StrToInt(stem3)<6) and (StrToInt(stem4)<=9) then
begin
stem5:='';
stem5:=Copy(sRStr,7,1);
stemM:=Copy(sRstr,4,2);
Val(stem5,tin,e);
if e=0 then
if ( ( (strtoint(stemH)=24) and (StrToInt(stemM)=0) and (StrToInt(stem5)<1)) or
((strtoint(stemH)<24) and (StrToInt(stemM)=60) and (StrToInt(stem5)<1)) or
((strtoint(stemH)<24) and (StrToInt(stemM)<60) and (StrToInt(stem5)<6))) then
begin
stem6:='';
stem6:=Copy(sRStr,8,1);
Val(stem6,tin,e);
if e=0 then
if ( ( (strtoint(stemH)=24) and (StrToInt(stemM)=0) and (StrToInt(stem6)<1)) or
((strtoint(stemH)<24) and (StrToInt(stemM)=60) and (StrToInt(stem5)<1)) or
((strtoint(stemH)<24) and (StrToInt(stemM)<60) and (StrToInt(stem5)<6))) then sold:=medtTime.EditText
else medtTime.EditText:=sold;
end
else medtTime.EditText:=sold;
end //strtoInt(stem4)<7
else medtTime.EditText:=sold;
end //strtoInt(stem3)<7
else medtTime.EditText:=sold;
end //strtoInt(stem3)<7
else medtTime.EditText:=sold;
end //strtoInt(stem1)<=2)
else medtTime.EditText:=sold;
end;
可以实现 就是效果不好