Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Convert character (A8) to date format
Go
New
Search
Notify
Tools
Reply
  
[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: 19 | Location: Rensselaer, NY | Registered: May 20, 2016Reply With QuoteReport 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, 2015Reply With QuoteReport 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: 19 | Location: Rensselaer, NY | Registered: May 20, 2016Reply With QuoteReport 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, 2011Reply With QuoteReport 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, 2005Reply With QuoteReport 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: 423 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport 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, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

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

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.