Focal Point
[SOLVED] Date FORMAT Conversion Using Info Assist+

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

July 30, 2018, 01:23 PM
NewBee...WF8
[SOLVED] Date FORMAT Conversion Using Info Assist+
How do you convert a date parameter in a report title from format YYYYMMDD to format MM/DD/YYYY.

Note:- This needs to be achieved using InfoAssist+ only.

Any advice is highly appreciated.

Thank you

This message has been edited. Last edited by: NewBee...WF8,


WebFOCUS 8
Windows, All Outputs
July 30, 2018, 02:33 PM
BabakNYC
Use a DEFINE, reformat the field and then put it in the heading.

  
DEFINE FILE WF_RETAIL
DATE_YYMD/YYMD=&YYMD;
DATE_MDYY/MDYY=DATE_YYMD;
END

TABLE FILE WF_RETAIL
HEADING CENTER
"<DATE_MDYY"
BY PRODUCT_CATEGORY
BY DATE_YYMD
BY DATE_MDYY
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *

ENDSTYLE
END



WebFOCUS 8206, Unix, Windows
July 30, 2018, 03:39 PM
NewBee...WF8
Thank you BabakNYC your suggestion works very well in the texteditor mode. But I am struggling to put this in DEFINE.

Can u pls pls tell me how do I do it in DATA> Detail(Define)

How to add ur piece of code. some reason my mind is not working at all today...(even tough its simple)


WebFOCUS 8
Windows, All Outputs
July 30, 2018, 04:18 PM
BabakNYC
In InfoAssist, go to Data, Define. You'll get prompted for a FIELDNAME, FORMAT and the logic for the define. Type a fieldname like DATE_YYMD, choose a date format of YYMD and type &YYMD in the box where the logic goes. Click Ok.

Then create a new Defined field let's call it DATE_MDYY, use date format of MDYY and place DATE_YYMD in the logic.

Now you have 2 virtual fields defined in InfoAssist. You should see these two on the list of fields on the left. You can now place them in headings, Sort on them et cetera.

You can do all of this in InfoAssist.


WebFOCUS 8206, Unix, Windows
July 30, 2018, 04:45 PM
NewBee...WF8
quote:
DATE_YYMD

Thank you So so so much BabakNYC....

As always this worked flawless...I TRULY APPRECIATE all your help.

Thank you once again

This message has been edited. Last edited by: NewBee...WF8,


WebFOCUS 8
Windows, All Outputs