Focal Point
[SOLVED] Date formats in XML

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

September 16, 2008, 05:47 PM
ChannyS
[SOLVED] Date formats in XML
I have the following fex:

DEFINE FILE CAR
test_FIELD/HYYMDs=DT(20080105140000354);
END
TABLE FILE CAR
PRINT
CAR
test_FIELD/HMDYYS
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END

When I PCHOLD the FEX to HTML, the date comes out as: 01/05/2008 14:00:00
When I PCHOLD the FEX to XML, the date comes out as: 20080105140000354

I would like to use this FEX to populate controls in the HTML Layout Painter but I need the date to come out 'pretty'.

Any ideas?

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


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
September 16, 2008, 05:53 PM
GinnyJakes
The reason the dates come out pretty in HTML is because you are seeing the 'display' format. That is what the HYYMDs is.

If you want the slashes and colons in the XML, you will have to convert the datetime to alpha and then use the EDIT funtion to put the special characters in.


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
September 16, 2008, 06:18 PM
ChannyS
Thanks. That worked. I actually used HCNVRT.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv