Home > database >  The data window query by date
The data window query by date

Time:10-01

PB ASA database, I want to realize the query by date, I import a datetime PBL, want to pass it to implement the query, the code is as follows:
String s_startdate, s_enddate
IF uo_1. Checked ()=True And uo_4. Checked ()=False THEN
S_startdate=f_getdate (Parent. Em_1)
S_enddate=f_getdate (Parent. Em_2)
Dw_1. SetRedraw (False)
Dw_1. SetFilter (" s_date='" + s_startdate + "' and s_date & lt;='" + s_enddate + "' ")
Dw_1. Filter ()
Dw_1. Retrieve ()
Dw_1. Object. T_startdate. Text=s_startdate
Dw_1. Object. T_enddate. Text=s_enddate
Dw_1. Object. S_date. Text=datetime ((today ()), now ())
Dw_1. SetRedraw (True)
The else
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
But does not perform, carry out to data!
Don't know what wrong!
Master please help!
The younger brother thanks first!

CodePudding user response:

Dw directly set date of two parameters, write the where condition
Dw_1. Retrieve (rq1 and rq2) came out!

CodePudding user response:

Uo_1 \ uo_4 \ f_getdate () is the custom thing, no one knows the
Put retrieve setfilter (), in front of the possible problem solved

CodePudding user response:

Positive solution on the second floor

CodePudding user response:

Yes, a simple function to do so complicated

CodePudding user response:

Look the debug runtime SetFilter format for

CodePudding user response:

See if the two time format

CodePudding user response:

Format.

CodePudding user response:

"S_date='" + s_startdate +"' "???????
Is "s_date & lt;='" + s_startdate + "' "
Should the

CodePudding user response:

"S_date & gt;='" + s_startdate + "'"

CodePudding user response:

Dw_1. SetFilter (" s_date=date (' + s_startdate + "") and s_date & lt;=the date (' "+ s_enddate +") ")

CodePudding user response:

The tenth floor
  • Related