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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Convert character (A8) to date format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Convert character (A8) to date format
 Login/Join
 
Member
posted
I am in Oracle 11g and working with AppStudio 82.

One for the date fields comes in from Oracle as a YYYYMMDD in character format, but I need to convert it to a date field in AS.

Is there a function i can't find that might do this for me?

This message has been edited. Last edited by: FP Mod Chuck,


John Coleman
WEBFocus 8.1.05
Windows 7
 
Posts: 20 | Location: Rensselaer, NY | Registered: May 20, 2016Report This Post
Platinum Member
posted Hide Post
You could try HINPUT...

https://webfocusinfocenter.inf...ng/source/hinput.htm


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Member
posted Hide Post
Than you. I should have said that in the post. I tried that but it was so poorly un-optimized that I couldn't go forward with it in production. I'll keep poking. Thank you for your answer though!


John Coleman
WEBFocus 8.1.05
Windows 7
 
Posts: 20 | Location: Rensselaer, NY | Registered: May 20, 2016Report This Post
Silver Member
posted Hide Post
Have you tried to convert using DATECVT instead? It works for date only and does not require the time portion to be in the date. might work better.

https://webfocusinfocenter.inf...9b-B343-9B01F25A24F0

you could always just convert it to an integer of I8YYMD.


WebFOCUS 8.2.02M
Windows
Server/8.2.02M
All Outputs
 
Posts: 43 | Location: Odessa, Florida | Registered: July 26, 2011Report This Post
Expert
posted Hide Post
How are you using the function? I assume it's in a DEFINE, therefore applies to every row. Try it in a COMPUTE, it will then be applied to the answer set.


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
or if you're using it in a filter, the SQL is probably not optimized. Could you post the code to have a better understanding?


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Master
posted Hide Post
John,

Another option if you are concerned with inefficiencies from WF would be to create a virtual field on the table in Oracle and do the conversion there. That way you aren't worrying about creating a define every time. then in the masterfile make sure the Actual value is date and usage is YYMD. Then your all set.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report 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] Convert character (A8) to date format

Copyright © 1996-2020 Information Builders