Focal Point
[SOLVED] Using HCNVRT

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

November 15, 2010, 11:08 AM
ktnj
[SOLVED] Using HCNVRT
Hello All,

Currently the HCNVRT function coded below :
TX_TS_O/A26 = HCNVRT(TX_TS,'(HYYMDm)', 26, 'A26');

Yields this output format:
2010/03/01 14:44:07.000000

I need the output field in this format:
2010-03-01-14.44.07.000000

Is this doable using HCNVRT?

Thanks to all

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


November 15, 2010, 11:09 AM
ktnj
My system info is
Z/OS
Focus 765


November 15, 2010, 11:18 AM
Kamesh
Try this,

TX_TS_O/A26 = EDIT(HCNVRT(TX_TS,'(HYYMDm)', 26, 'A26'),'9999-99-99-99.99.99.999999');

Hope this helps.


WFConsultant

WF 8105M on Win7/Tomcat
November 15, 2010, 11:28 AM
GamP
quote:
TX_TS_O/A26 = EDIT(HCNVRT(TX_TS,'(HYYMDm)', 26, 'A26'),'9999-99-99-99.99.99.999999');

Should the EDIT mask not read '9999$-99$-99$-99$.99$.99$.999999'? The $ sign skips the part that you do not need...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
November 15, 2010, 12:57 PM
ktnj
[SOLVED]
'9999$-99$-99$-99$.99$.99$.999999' did the trick.

Thanks to all!