Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Comparing time fields in a filter

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Comparing time fields in a filter
 Login/Join
 
Gold member
posted
I am trying to replicate this code:

WHERE FWLSTARTDATETIME GE DT(&TODAY 04:45:00);
WHERE FWLSTARTDATETIME LE DT(&TODAY 23:59:59);

But I can't figure out how to make a field that that pulls the current date but then assigns it a certain hour and minute.

Tried this in a define field but got an error:

This message has been edited. Last edited by: Cimmerian,


WebFocus 8.2, IA+, Windows 10, HTML
 
Posts: 56 | Location: UT | Registered: December 01, 2015Report This Post
Expert
posted Hide Post
Use &YYMD and take out the colons.

The documentation tells you what DT supports


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Not quite sure I understand what you are telling me to do, sorry here's a screenshot:



WebFocus 8.2, IA+, Windows 10, HTML
 
Posts: 56 | Location: UT | Registered: December 01, 2015Report This Post
Master
posted Hide Post
The documentation suggests the following format, although I shudder at the choice of 12:00:00AM as an example. All that shows is that the author is profoundly ignorant* of Latin and geography - and a slave to a bad convention.

WHERE TESTDT EQ DT(2009-02-06 12:00:00AM);

*AM stands for Ante Meridian and PM stands for Post Meridian. For a viewer on earth, the sun reaches it's zenith during the day at a time that corresponds to the actual meridian on the earth on which the viewer stands. We call that time noon - the point at which the sun crosses the meridian where we are.

Thus 12 hours Ante Meridian is the previous midnight. But 12 hours Post Meridian is ALSO midnight - the one coming up.

An alternative interpretation is that 12:00:00AM means 0 seconds before noon (if 11:59:59AM is one second before noon) and 12:00:00PM means zero seconds after noon (if 12:00:01 is one second after noon). Thus 12:00:00AM = 12:00:00PM. Nuts, no matter how you look at it.

So 11:59:59AM is defensible, and so is 12:00:01PM, but 12:00:00AM and 12:00:00PM ain't.

24-hour time, anyone?

But to solve your issue, you could do it in three four steps:

a) Create a variable that just captures the date, since that isn't a constant, then
b) Convert the date to alpha, (several methods), then
c) Concatenate the date with the static time, then
d) Use HCNVRT to convert the string to a Smart DateTime

Of course all this could be done on a single line with a bunch of brackets - I'll leave it up to the experts as to whether that's more efficient than separate defines (in my work I'm rarely concerned with performance issues, so I tend to be wordy and spell it out step by step).

.... Allow me a further digression on the origin of the word noon itself. This derives from the Christian liturgy in which a set of prayers called None(s) is said at the ninth hour after dawn. Monks in the middle ages ate breakfast before dawn and were not allowed to eat again until after Nones - that is until after the ninth hour. But the length of the hour was not constant between summer and winter, since it was the convention to have 12 hours from dawn to dusk. So monks in more northerly latitudes wouldn't get anything to eat from something like 5am to 6pm in summer, when they were out working in the fields etc. and needed nourishment. So a petition went to the pope, and a decree was issued that Nones could be said when the sun was at its zenith. Thus we have the word "noon" for the middle of the day ... Store that up for your next trivia game .....

This message has been edited. Last edited by: George Patton,


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Gold member
posted Hide Post
Although it took me a second to find out that HCNVRT actually converts dates to alphanumerics and HINPUT converts alphas to dates you definitely pointed me in the right direction. I really appreciate it! Also all the additional information about time was both interesting and entertaining, thanks again! I will mark this thread to solved.


WebFocus 8.2, IA+, Windows 10, HTML
 
Posts: 56 | Location: UT | Registered: December 01, 2015Report This Post
Master
posted Hide Post
Oops !! My bad.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Comparing time fields in a filter

Copyright © 1996-2020 Information Builders