on 09-20-2009 11:44 PM
hello i have this sql query and im trying to work with SD and ED, but i want a special thing :)...for example, today is 20/09/2009 and i want that SD = 20/09/2009 00:00:00 and ED = 20/09/2009 hours...but the hours of ED is the hours that the user loads the page...it is possible to do this??...if this isnt possible how can i catch the value from a textbox??
select sum(max(yieldqty)) as Max_Yield, sum(max(scrapqty)) as Max_Scrap
from z_event
where linenumber= Parameter1 and shiftnumber = Parameter2 and
eventtimestamp >= SD and
eventtimestamp <= ED
group by ordernumber
regards
Mário
Hi,
Say this is your Text box in html/irpt page
<input type="text" size="10" name="T1" id="T1">
Then in Javascript use the following
1) If textbox is inside a html form <form name="MyForm">></form> then
var Textval = document.MyForm.T1.value
2) if No form is used in html/irpt then
var Textval = document.getElementById("T1").value
Then Pass the fetched date time value to respective applet as parameters using setParam.
Hope this helps!!
Regards,
Adarsh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks a lot for helping me
regards
Mário
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Assuming your query uses the proper date tokens
[SD] and [ED]
you can put Today@00:00:00 in the Time text field on the date tab of your query template, then make your Duration 1 Day and make sure that the Allow Future dates checkbox is disabled. The Time field effectively sets the startdate in this example and with the query not allowing future times, you will essentially get your desired 'Day until now' time range, which will go into your query's where clause tokens.
This way the EndDate will be now() and the startdate of your query will be at 0:00 hours today. Test your query template in text/xml and observe the Rowsets StartDate and EndDate attributes at the top of the xml and you'll see the values set by the query details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.