입력된 날자의 정확성을 체크하는 함수입니다.
도움이 되시길 ....
(*날자 Checking*)
function UDF_IsDate(PST_ChkDate : String):Boolean;
{ PST_ChkDate : String -> 날자형태 문자열
Result : Boolean -> 날자변환 여부 Return
[ Example ] ---------------------------------->
UDF_IsDate('19960715') => True
UDF_IsDate('19960732') => False }
begin
Result := False;
if PST_ChkDate <> '' then
Insert('/',PST_ChkDate,5);
Insert('/',PST_ChkDate,8);
try
StrToDate(PST_ChkDate);
Result := True;
except
Result := False;
end;
end;
|