procedure TFFSWS1060I.SaveSaleInfo();
var
P_datetime : TDateTime;
begin
if not CDS1.Active then Exit;
CDS1.Next;
Screen.Cursor := crHourGlass;
CDS1.DisableControls;
try
with CDS1 do
begin
if IsEmpty then Exit;
First;
while not Eof do
begin
if ( UpdateStatus in [usModified,usInserted] ) then
begin
Edit;
FieldByName('등록사번').AsString := arg[0];
--> P_datetime := StrToDateTime(FormatDateTime('mmddyyyy hhmmss', now));
--> FieldByName('등록일자').AsDateTime := P_datetime;
Post;
end;
Next;
end;
if ApplyUpdates(0) > 0 then Exit; //CDS1BeforeApplyUpdates
end;
finally
CDS1.EnableControls;
Screen.Cursor := crDefault;
end;
ComboBox101.SetFocus;
Application.MessageBox(PChar(MsgI02), '확인', MB_ICONINFORMATION+MB_OK);
end;
데이타가 수정이 되면 "등록일자"칼럼에 현재시간을 넣을려고 합니다.
위와 같이 화살표처럼 했는데 다음과 같이 에러가 나오네요
" EConvertError with message ''10302007 160547' is not a valid date and time'
뭐가 잘못됐는지 모르겠어요.
고수님들 도와주세요
'11012007 093507' 이런 형식의 데이터가 Datetime형이라고
생각하는것은 개발하고 계신분만 이해할 수 있지않을까 싶습니다.
DB에는 그냥 now만 입력하시고 나중에 추출할 때 Formatdatetime으로
입맛에 맞추시는게 어떨까요..