You is really a big pit dad whoa whoa!!!!!! I want to be it crazy!!!!!!!!!!!!
Ask you a great god, how to put the string format into the date format and only monthly match can query,
Concrete is like this:
I have a window in the final to display the contents of the controls is dw1, connection is dw_cx_grid
Dw_cx_grid inside has set up a cxny parameters, the operator is like, field is the "balance of payments records." "time" (in the form it is the date type)
Window page like this:
Query years are DDLB controls, year is ddlb_1, month is ddlb_2
I in query click event is written like this:
Dw_1. Reset ()
Dw_1. Settransobject (sqlca)
String nian, make
The date cxny
Nian=string (ddlb_1. Text)
Make=string (ddlb_2. Text)
Cxny=date (string (nian + "/" + + "/" + "%") make)
Dw_1. Retrieve (cxny)
If dw_1. Retrieve (cxny)=0 then messagebox (' prompt ', 'did not meet the conditions of record! ')
End the if
Other as if there is no problem, is can't match cxny... Because my time is the date in the form, but now I only need monthly match can be found out the result can't, how to check there is no record, if I try to write directly cxny=date (" 2013/12/3 "), you can check out,
Whoa whoa!!!!!!!!!! Please allow the last roar again... I hate you!!!!!!!!!!!!!!
CodePudding user response:
There is a problem you ~
It is best not to direct to retrieve the time parameter, but will time format string ~
The incoming character type to retrieve ~
CodePudding user response:
refer to the original poster u013047537 response: you is really a big pit dad whoa whoa!!!!!! I want to be it crazy!!!!!!!!!!!! Ask you a great god, how to put the string format into the date format and only monthly match can query, Concrete is like this: I have a window in the final to display the contents of the controls is dw1, connection is dw_cx_grid Dw_cx_grid inside has set up a cxny parameters, the operator is like, field is the "balance of payments records." "time" (in the form it is the date type) Window page like this: Query years are DDLB controls, year is ddlb_1, month is ddlb_2 I in query click event is written like this: Dw_1. Reset () Dw_1. Settransobject (sqlca) String nian, make The date cxny Nian=string (ddlb_1. Text) Make=string (ddlb_2. Text) Cxny=date (string (nian + "/" + + "/" + "%") make) Dw_1. Retrieve (cxny) If dw_1. Retrieve (cxny)=0 then messagebox (' prompt ', 'did not meet the conditions of record! ') End the if Other as if there is no problem, is can't match cxny... Because my time is the date in the form, but now I only need monthly match can be found out the result can't, how to check there is no record, if I try to write directly cxny=date (" 2013/12/3 "), you can check out, Whoa whoa!!!!!!!!!! Please allow the last roar again... I hate you!!!!!!!!!!!!!! Grammar turned to make mistakes, you use grammar must be at the bottom of the conversion is successful to the values you want, Cxny=date (string (nian + "/" + + "/" + "%") make) To define the parameters of the DW directly as of type string, Don't have to convert the date with this type of a try, Cxny=string (nian + "/" + make + "/" + "%") Dw_1. Retrieve (cxny) CodePudding user response:
Such a simple question, see the help documentation with respect to OK CodePudding user response:
refer to the second floor smilysoft response: Quote: refer to the original poster u013047537 response: You is really a big pit dad whoa whoa!!!!!! I want to be it crazy!!!!!!!!!!!! Ask you a great god, how to put the string format into the date format and only monthly match can query, Concrete is like this: I have a window in the final to display the contents of the controls is dw1, connection is dw_cx_grid Dw_cx_grid inside has set up a cxny parameters, the operator is like, field is the "balance of payments records." "time" (in the form it is the date type) Window page like this: Query years are DDLB controls, year is ddlb_1, month is ddlb_2 I in query click event is written like this: Dw_1. Reset () Dw_1. Settransobject (sqlca) String nian, make The date cxny Nian=string (ddlb_1. Text) Make=string (ddlb_2. Text) Cxny=date (string (nian + "/" + + "/" + "%") make) Dw_1. Retrieve (cxny) If dw_1. Retrieve (cxny)=0 then messagebox (' prompt ', 'did not meet the conditions of record! ') End the if Other as if there is no problem, is can't match cxny... Because my time is the date in the form, but now I only need monthly match can be found out the result can't, how to check there is no record, if I try to write directly cxny=date (" 2013/12/3 "), you can check out, Whoa whoa!!!!!!!!!! Please allow the last roar again... I hate you!!!!!!!!!!!!!! Grammar turned to make mistakes, you use grammar must be at the bottom of the conversion is successful to the values you want, Cxny=date (string (nian + "/" + + "/" + "%") make) To define the parameters of the DW directly as of type string, Don't have to convert the date with this type of a try, Cxny=string (nian + "/" + make + "/" + "%") Dw_1. Retrieve (cxny) If the table there is a character is ok, but I want to let the user to enter the time before convenient point, so with the date type, and then set the date for the editmask type, do I need to change a back again... Really want to cry... CodePudding user response:
reference 1st floor xiaozhe_song response: there is a problem you ~ It is best not to direct to retrieve the time parameter, but will time format string ~ The incoming character type to retrieve ~ Because my time format is inside the form, if use character can't find,,, Good sad ~ and I found a new problem... When I use a program to find how to put it all of the projects have become a drop-down list for customers to choose and then get out to retrieve results show to DW1... Before I use the drop-down control oneself are written, I don't know what the customer wants to increase project... My project has a data window dw_xmlx Then I built a dw_2 in the window, I found that I still have no way to connect! The tears to cry CodePudding user response:
reference SKY_4K_PPM reply: 3/f such a simple question, see the help documentation with respect to OK Simple... Great god please hold thigh! Documentation is in English... My English is not good whoa oww, CodePudding user response:
You can do this, compare the original data window of SQL for Select a, b from the table where a like: as_ddd; You can change the SQL to the following code //if you use oracle database Select a, b from the table where to_char (a, 'YYYY/MM) like: as_ddd; nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull