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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Extracting TIme
 Login/Join
 
Gold member
posted
hi Smiler

how do i extract JUST time from the following:

TABLE FILE EMPLOYEE
PRINT LAST_NAME FIRST_NAME
COMPUTE RAISETIME/HMDYYIA = DT(20000101 9:00AM);
COMPUTE MYTEST/HDIA = RAISETIME;
----- THE LAST COMPUTE LOOKS LIKE THIS:
01 9:00AM

HOW DO I GET RID OF THAT 01 UP FRONT? Frowner
END

i need to compare the time (including the am/pm only)

Thanks!

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


~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~
PROD: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode/Self-Serve Apps Only (No App Server)
TEST: WebFOCUS 7.1.3 on Win 2K/IIS 6/Weblogic 8.1/Servlet Mode
 
Posts: 74 | Location: Gaithersburg, MD | Registered: August 08, 2006Report This Post
Expert
posted Hide Post
Always ready to help MadamZuZu (what does the second Zu stand for?)

Isolating the time for a Date/Time column:

-*-- SETUP DATE/TIME FOR SQL ---
-SET &RUN_DT    = EDIT(&YYMD,'9999/99/99');
-SET &RUN_TM    = EDIT(HHMMSS('A8'),'99$:99$:99');
-SET &RUN_DTTMS = &RUN_DT | ' ' | &RUN_TM;


DEFINE FILE CAR
FAKEDATE/HYYMDS = HINPUT(14,'&RUN_DTTMS', 8, 'HYYMDS');
BOL_CREATED/HMDYYIA=FAKEDATE;
BOL_TIME/HHIA = BOL_CREATED;
END
-RUN 

TABLE FILE CAR
PRINT
BOL_CREATED BOL_TIME
BY CAR
END


Not sure about comparing two time fields though...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
You can use the HTIME() function to extract the time in milliseconds.
COMPUTE C_TIME/D12 = HTIME(8,BOL_CREATED,'D12'); 


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
Ah yes, then you CAN compare. Thanks dhagen.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
what if i need to do a "WHERE" on my time

TABLE FILE EMPLOYEE
PRINT LAST_NAME FIRST_NAME
COMPUTE RAISETIME/HMDYYIA = DT(20000101 9:00AM);
COMPUTE MYTEST/HHIA = RAISETIME;
END

i can't compare a date-time field to an alpha...
so, for example. how can i get all the records which are ater 12:00am?


~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~
PROD: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode/Self-Serve Apps Only (No App Server)
TEST: WebFOCUS 7.1.3 on Win 2K/IIS 6/Weblogic 8.1/Servlet Mode
 
Posts: 74 | Location: Gaithersburg, MD | Registered: August 08, 2006Report This Post
Expert
posted Hide Post
You may need to use dhagen's suggestion and create a field with the extracted time in milliseconds and use that field in the WHERE statement - 12:00am is midnight so it's 0 milliseconds (I think)

WHERE C_TIME GT 0


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders