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] TIME and Date to Date only

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] TIME and Date to Date only
 Login/Join
 
Guru
posted
How do I convert date and time column to only date column

My date looks like this 2002-12-26 00:00:00.000
What function can I use to make it look like this 2002-12-26

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


WebFOCUS 7.6.10
Windows
HTML
 
Posts: 294 | Registered: March 04, 2010Report This Post
Expert
posted Hide Post
Please check the "Using Function" manual and the search capability on this forum for the subroutine HDATE which converts the date portion of a datetime stamp to a date.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Silver Member
posted Hide Post
convert your field date data type- select "none" for time part


WebFOCUS 7.6.X/7.7.X
Windows
all output
 
Posts: 31 | Registered: March 17, 2010Report This Post
Expert
posted Hide Post
quote:
"none"
?


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
Guru
posted Hide Post
It works to show the date on the reprot, but when I want to use this date for period calculations, my calulations dont work with formate change in dev studio.


WebFOCUS 7.6.10
Windows
HTML
 
Posts: 294 | Registered: March 04, 2010Report This Post
Expert
posted Hide Post
Please see my previous post. Use the HDATE function.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
I am getting results in integers for the following HDATE. Its not bring the date back.
HDATE(STAGE_CHILD_POS.STAGE_CHILD_POS.SCHOOLOPENDATE, 'YYMD')


WebFOCUS 7.6.10
Windows
HTML
 
Posts: 294 | Registered: March 04, 2010Report This Post
Expert
posted Hide Post
Though your "date looks like this 2002-12-26 00:00:00.000", the format of the field is more important. What is the format for field SCHOOLOPENDATE in the Master for table STAGE_CHILD_POS?


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
Guru
posted Hide Post
Formate of my field is datetime. Its coming from SQL 2008 server.


WebFOCUS 7.6.10
Windows
HTML
 
Posts: 294 | Registered: March 04, 2010Report This Post
Virtuoso
posted Hide Post
Can you post the exact piece of code where you're making the transformation using HDATE? It would also be helpful to see the FIELD definition of SCHOOLOPENDATE as it appears in your masterfile.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Guru
posted Hide Post
This being an H format date, why not assign it to an HYYMD formatted field for display?

TABLE FILE WHATEVER
PRINT
SCHOOLOPENDATE/HYYMD
etc

edited to add:
I recommend the following text, (Almost) 101 Watys to Work with DATES in WebFOCUS. I would draw your attention to Example 19.4b or Table 3.14.

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


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Virtuoso
posted Hide Post
If you're just always using the date portion of the field and never have need of the time portion, then it might be the smartest to change the master file. Change the usage (or format) to read YYMD and change the actual to read DATE, in stead of HYYMDs. Then you do not need to use HDATE or some such conversion method. But, you do have to watch out for re-creating the synonym... although I seem to remember that there is also a setting to create synonyms with date fields iso date-time fields.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Pls check whether you can use the HCNVRT function.
Syntax is as follows.
  
ALPHA_DATE_TIME2/A20 = HCNVRT(TRANSDATE, '(HYYMDS)', 20, 'A20');


Regards,
Kasi Krishnan
WF 7.1.4 & WF 7.6.9: Databases - DB2, SQL Server 2000.
OS: Windows & AIX
 
Posts: 71 | Registered: November 20, 2003Report 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] TIME and Date to Date only

Copyright © 1996-2020 Information Builders