As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Hi, I have a difficulty finding the difference between the 2 timestamps.
The date, time and AM/PM information are getting passed from the launch page. I need to pull the data for date and time range mentioned in the launch page. Ex - date1 = 2010/02/01 date2 = 2010/02/02 time1 = 10:00PM time2 = 04:00AM the report should run for these 2 days for the time range between 10:00PM to 04:00AMThis message has been edited. Last edited by: Kerry,
769 Excel,PDF and HTML
Posts: 35 | Location: Bangalore | Registered: March 27, 2008
Have a look at this thread: http://forums.informationbuild...971057331/m/90910134 and see if that helps (especially the last post). You may have to concatenate your beginning date and time and your ending date and time to a single field, then do the comparison.
I have a difficulty finding the difference between the 2 timestamps
quote:
the report should run for these 2 days for the time range between 10:00PM to 04:00AM
Shru, I don't think I understand your need correctly. Do you need to retrieve data in a date/time range or do you need to calculate the difference between 2 timestamps?
If the former one applies, you might find the DT function very useful.
You can quickly retrieve records in a date/time range by using something like:
-SET &DATE1=20100201;
-SET &DATE2=20100202;
-SET &TIME1='10:00:00';
-SET &TIME2='16:00:00';
-*
TABLE FILE your_table
PRINT your_field
WHERE you_datestamp_field FROM DT(&DATE1 &TIME1) TO DT(&DATE2 &TIME2)
END
Read some documentation about the DT function to determine which format you need to use when passing parameters to it.
There is a very good book available that gives you many many functions onluy onm dates "(Almost) 1001 ways to work with dates in WebFocus" ISBN: 978-0-9791711-1-2
I payed 25 USD...
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
i tried using DT function. But by using DT it will give me the complete range from start date to end date ex : 2009/12/01 23:00:00- 2009/14/10 06:00:00 DT will give the records from 23:00:00 of 12 day to 06:00:00 of 14th day. but what i am looking at is the records those are entered only through the time frame 23:00:00 - 06:00:00.
I just want to mention that the time is entered in 12 hour format in the launch page but in the database it is military format
769 Excel,PDF and HTML
Posts: 35 | Location: Bangalore | Registered: March 27, 2008
If I understand your requirement correctly, I think njsden's suggestion can still solve your challenge:
TABLE FILE your_table
PRINT your_field
WHERE your_datestamp_field FROM DT(&DATE1 &TIME1) TO DT(&DATE1 &TIME2)
OR your_datestamp_field FROM DT(&DATE2 &TIME1) TO DT(&DATE2 &TIME2);
END
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
I just want to mention that the time is entered in 12 hour format in the launch page but in the database it is military format
Hi Shru, as far as I know DT() requires time in a 24-hour format. If your input is provided in a 12-hour format you'll have to convert it before passing it to DT() which is very easy to do; you may need to play a little with GETTOK to parse &TIME1 and obtain each time component.
Dan's example show you how to retrieve your records in a specific time frame. It has nothing to do with the use of the DT() function but in how you structure your selection criteria, which he clearly outlines there.