datetime to smalldatetime

From: P.S.Bell (pat_at_patbell.co.uk)
Date: 03/30/05


Date: Wed, 30 Mar 2005 14:25:44 +0100


> You cannot directly set a MSSQL SmallDateTime to a Delphi TDateTime (square
> peg in a round hole), but converting is easy (just make the hole bigger :).
>
> {One way of probably many...}
> MyQuery.FieldByName('MySmallDate').AsString := FormatDateTime('mm/dd/yyyy
> hh:nn',Now);
>
Wrong way around - I have delphi/paradox datetimes to put into sql server
smalldatetimes. But after 5 days of trying I shall accept defeat and just
insist the target database is changed.

Pat Bell