🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages Started by GIORDANO & C. S.p.A. Wed, 24 May 2000 00:00
SQL date
#1149
Author: GIORDANO & C. S.p.A.
Date: Wed, 24 May 2000 00:00
23 lines
1093 bytes
I have an Interbase database with a field
            DATA_INI date

I need to select the record using 4 TMaskEdit
            TMaskEdit FROM_DATE
            TMaskEdit FROM_TIME
            TMaskEdit TO_DATE
            TMaskEdit TO_TIME

I want only the record between FROM_DATA and TO_DATA; so that I wrote:

            AnsiString FROM_DATE_TIME = FROM_DATE + FROM_TIME;
            AnsiString TO_DATE_TIME = TO_DATE + TO_TIME;

            select .....
            from ....
            where DATA_INI >= FROM_DATE_TIME->Text
            and     DATA_INI <= TO_DATE_TIME->Text

This is not ok; what can I do ???

Thank you
Silvana
Re: SQL date
#1150
Author: Kevin
Date: Wed, 24 May 2000 00:00
43 lines
1897 bytes
What is the  problem?
is it syntax, or did it not return the records you wanted?

if it didn't return the records you wanted try
selecting based only on the from_date and from_time
and see if that gives you what you expected.

             select .....
             from ....
             where DATA_INI >= FROM_DATE_TIME->Text

if not modify your where clause to get what you wanted.
Then do the same with the to_date and to_time, and then try combining them.
hope this helps
--Kevin

"GIORDANO & C. S.p.A." <giordano@mtrade.com> wrote in message
news:392b899f@dnews...
> I have an Interbase database with a field
>             DATA_INI date
>
> I need to select the record using 4 TMaskEdit
>             TMaskEdit FROM_DATE
>             TMaskEdit FROM_TIME
>             TMaskEdit TO_DATE
>             TMaskEdit TO_TIME
>
> I want only the record between FROM_DATA and TO_DATA; so that I wrote:
>
>             AnsiString FROM_DATE_TIME = FROM_DATE + FROM_TIME;
>             AnsiString TO_DATE_TIME = TO_DATE + TO_TIME;
>
>             select .....
>             from ....
>             where DATA_INI >= FROM_DATE_TIME->Text
>             and     DATA_INI <= TO_DATE_TIME->Text
>
> This is not ok; what can I do ???
>
> Thank you
> Silvana
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads