Focal Point
[SOLVED]Can time be retrieved despite USAGE=YYMD?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7367098186

April 19, 2016, 04:31 AM
DomR
[SOLVED]Can time be retrieved despite USAGE=YYMD?
I am working with a date field that is described as USAGE=YYMD and ACTUAL=DATE and which holds both date and time components. In my report, I need to compare its values to those of a datetime field that is HYYMDI. I cannot change the master files.

What I do not understand from the documentation is whether the above USAGE strips the time components from the field before values are returned, or whether USAGE is only a formatting instruction for the report output while the time components are still accessible. For the comparison I am converting the field to HYYMDI using the HDTTM function, but predictably I get midnight as the time. Is there a way to get the correct time back?

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 7.7.03
Windows 7 64-bit
April 19, 2016, 03:06 PM
njsden
Hi DomR,

It is the "ACTUAL=DATE" setting that is instructing the adapter to retrieve only the "date" portion from your DB column. USAGE=YYMD just is formatting to be used as '2016/04/19' for display purposes.

For you to access the "time" portion of your DB field, you'll need to have ACTUAL=HYYMDI with a compatible USAGE (such as HYYMDI). Only then you can perform any time operations you'll need.

That change has to be done at the metadata layer so if you can't change the master then you won't be able to go much further.

If the reason for not changing the master is that this field is already used in other reports and needs to be treated as a date only (no time portion), you could potentially add another field to the masterfile using the same ALIAS (so it refers to the very same DB column) along the appropriate combination of ACTUAL and USAGE as needed.



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.
April 20, 2016, 03:22 AM
DomR
Hi njsden,

Thanks for your answer, this clears things up for me. I will ask our administrator to add another field to the master file that retains both the date and time portions, as you suggested.


WebFOCUS 7.7.03
Windows 7 64-bit