Re: Sql Date Question
- From: "Scott Toney" <scott@xxxxxxxxxxxxxxx>
- Date: Mon, 20 Nov 2006 12:37:21 -0600
Can you use
Add(' where apptdate between ' + QuotedStr(FormatDateTime('mm"/"dd"/"yyyy',
FromDate)));
Add(' and ' + QuotedStr(FormatDateTime('mm"/"dd"/"yyyy', ToDate)));
Add(' Order by LeadNo');
And you would need a space after Table1' or before the 'Where and before the
Order statement.
"John" <johnpk1946@xxxxxxxxx> wrote in message
news:4561e905$2@xxxxxxxxxxxxxxxxxxxxxxxxx
HiQuotedStr(FormatDateTime('mm"/"dd"/"yyyy', FromDate)));
Add('Select * from Table1');
Add('Where APPTDATE >= ' +
Add(' AND APPTDATE <= ' +same
QuotedStr(FormatDateTime('mm"/"dd"/"yyyy', ToDate)));
Add('Order by LeadNo');
The above sql stmt works find if the from & to dates are within the
year but not if the years is different. The table will have many yeats on
it.
Something is amiss but I can't figure it out.
Thanks
John
.
- References:
- Sql Date Question
- From: John
- Sql Date Question
- Prev by Date: Re: Handling Open Exception
- Next by Date: Re: Handling Open Exception
- Previous by thread: Sql Date Question
- Next by thread: Re: Sql Date Question
- Index(es):