Subject | Re: [ib-support] selecting a date |
---|---|
Author | Sindunata |
Post date | 2001-07-05T03:32:42Z |
Hi, try this one:
Q_Pim.SQL.Add('select * from PIM where DATE_START >= ' +
FormatDateTime('''yyyy-mm-dd hh:nn:ss''', Curr_Date));
or try using parameterized query:
Q_Pim.SQL.Add('select * from PIM where DATE_START >= :DateStart');
Q_Pim.ParamByName('DateStart').AsDateTime := Curr_Date;
Q_Pim.SQL.Add('select * from PIM where DATE_START >= ' +
FormatDateTime('''yyyy-mm-dd hh:nn:ss''', Curr_Date));
or try using parameterized query:
Q_Pim.SQL.Add('select * from PIM where DATE_START >= :DateStart');
Q_Pim.ParamByName('DateStart').AsDateTime := Curr_Date;
On Wed, Jul 04, 2001 at 05:45:23PM -0000, lee@... wrote:
> what is the correct way to select a date from a table.
> I got a TDateTime with a date and a time
>
> In a table I got several dates with several times
> I want to make a selection for a specific date
> How do I have to do this ?
>
> This does not work :
> Curr_Date: TDateTime;
>
> Q_Pim.SQL.Add('select * from PIM where DATE_START >= ' + DateTimeToStr
> (Curr_Date));
>
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>