Board index » delphi » Clientdataset+dd-mmm-yy date format

Clientdataset+dd-mmm-yy date format


2004-11-10 04:28:27 PM
delphi73
has there any work around on this problem already wherein clientdataset
cannot convert dd-mmm-yy to correct format?
 
 

Re:Clientdataset+dd-mmm-yy date format

here's a sample code:
ShortDateFormat := 'dd/mm/yy';
dm.cdsUser.FieldByName('LastLogin').AsDateTime := date;
if dm.cdsUser.Modified then
begin
dm.cdsUser.Post;
dm.cdsUser.ApplyUpdates(-1);
end;
the error will occur if you changed your Date setting on Regional Options of
Control panel to 'dd-mmm-yy'. Still an error 'invalid date' will occur on
appying the update on the clientdataset even if I tried to use
ShortDateFormat. The date doesn't really change to shortdateformat
'dd/mm/yy/ ' but would remain as 'dd-mmm-yy'.
I even have a function to change 'dd-mmm-yy' to 'dd-mm-yy', still same
error.
"Brian Bushay TeamB" <XXXX@XXXXX.COM>writes
Quote

>has there any work around on this problem already wherein clientdataset
>cannot convert dd-mmm-yy to correct format?

It would be helpful if you provided ed some context to explain when you
are
getting this error.
Have you tried setting the ShortDateFormat variable?
--
Brian Bushay (TeamB)
XXXX@XXXXX.COM