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     Date-Time field display

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Date-Time field display
 Login/Join
 
Silver Member
posted
I have a Date-Time field (HYYMDS) in Oracle database. The master file would be something like this:

FILE=newmas, SUFFIX=SQLORA
SEGNAME=ROOT_SEG, SEGTYPE=S0, $
FIELD=FIELD1, ALIAS=FIELD1, USAGE=HYYMDS, ACTUAL=HYYMDS, MISSING=ON, $
FIELD=FIELD2, ALIAS=FIELD2, USAGE=HYYMDS, ACTUAL= HYYMDS, MISSING=ON, $

I want to display FIELD1 without the time portion; something similar to ‘January 1, 1900’ format. To do so, I could either:
1. Strip the date portion off of Date-Time (using HDATE) and then use CHGDAT function to display in MDYYX format OR
2. I could simply change FIELD1 in master file (USAGE= trMDYY, ACTUAL=DATE).
For FIELD2 I want to display both date and time and display should look like ‘January 1, 1900 9:37AM’ format. This is where I run into problems. I could not find any function that would take an ‘HYYMDS’ field and display it in ‘January 1, 1900 8:37AM’ format. Only thing I could find was either ‘HYYMDSA’ or ‘HYYMDA’. I welcome any suggestion to get this resolved. Thanks in advance.
Mike


Prod: WebFOCUS 7.1.3 on Linux Kernel-2.6.5 zSeries 64bit/Apache Tomcat/5.0.28 JAVA version 1.4.2_11 server
 
Posts: 35 | Location: Oklahoma City | Registered: May 11, 2006Report This Post
Expert
posted Hide Post
This demo fex may be of assistance:
-SET &ECHO=ALL;

-SET &CURR_DATE = &YYMD;
-SET &CURR_TIME = EDIT(HHMMSS('A8'),'99$99$99');

-SET &CURR_DTTM = &CURR_DATE | &CURR_TIME;

DEFINE FILE CAR
CURR_DATE/HYYMDS WITH MODEL = HINPUT(14, '&CURR_DTTM', 8, 'HYYMDS');
END

TABLE FILE CAR
PRINT
CURR_DATE           AS 'A1'
CURR_DATE/HYYMDSA   AS 'A2'
CURR_DATE/HMTDYYSA  AS 'A3'
CURR_DATE/HMtDYYSA  AS 'A4'

COMPUTE CURR_YYMD/YYMD = HDATE(CURR_DATE, 'YYMD'); AS 'B1'
CURR_YYMD/MTDYY     AS 'B2'
CURR_YYMD/MTRDYY    AS 'B3'
CURR_YYMD/MtDYY     AS 'B4'
CURR_YYMD/MtrDYY    AS 'B5'
WHERE RECORDLIMIT EQ 1
END
-RUN


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
Try This

DDATE/YYMD = HDATE(WKEND_DATE, 'YYMD');
NDATE/MtrDYY = DDATE;


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Silver Member
posted Hide Post
Prarie, I was already using HDATE function and it worked fine for “date only” display. I was having trouble in displaying “date-time together” in same format (January 1, 1900 9:37AM). Thanks to Francis, I tried his suggestion for Date-Time display and it worked great (except for a tiny difference which I am not worried about). I appreciate both of you for a quick response. Thanks again.
Mike


Prod: WebFOCUS 7.1.3 on Linux Kernel-2.6.5 zSeries 64bit/Apache Tomcat/5.0.28 JAVA version 1.4.2_11 server
 
Posts: 35 | Location: Oklahoma City | Registered: May 11, 2006Report 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     Date-Time field display

Copyright © 1996-2020 Information Builders