Focal Point
(SOLVED) COMT output - keep '/' separator character for dates?

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

August 03, 2018, 01:35 PM
LarissaB
(SOLVED) COMT output - keep '/' separator character for dates?
Hey users,
We are running a large project where we have to create extracts in a csv format output. I am using the COMT format for this, but it removes all the forward slash (/) date separators when the file is saved to the upload location. Does anyone know of a way to keep the original formatting to keep the date in 08/03/2018 form instead of it overwriting the date to reflect as 8032018?

I have a few dates hard coded into the report, and those come across with the forward slash separator and they are not removed. It is only removing the separator for MDYY fields pulled into the report.

Thank you for any help!
-Larissa

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


Version: 8.2.03M, OS/Platform: Windows 7 & 10, Output: Excel, pdf, html
August 03, 2018, 01:50 PM
Les J
Larissa, try this.

TRX_DATE1/A8MDYY = TRX_DATE ;
TRX_DATE2/A10 = EDIT(TRX_DATE1, '99/99/9999') ;

It produced this...
08012018,"08/01/2018"
07272018,"07/27/2018"
07252018,"07/25/2018"


WebFOCUS 8

Windows, All Outputs
August 03, 2018, 02:49 PM
LarissaB
Les - You did it! This worked perfectly. Thank you my friend!
-LB


Version: 8.2.03M, OS/Platform: Windows 7 & 10, Output: Excel, pdf, html
August 06, 2018, 09:14 AM
jgelona
First, COMT was not removing the "/". The "/" were removed because COMT is a file format. The exact same thing happens with HOLDFORMAT ALPHA, SAVE, TABT, etc. file formats. When creating a HOLD file, if you want to save the formatted output of a field, try using FPRINT. Assuming TRX_DATE is a smart date:
PTRXDT/A10=FPRINT(TRX_DATE,'MDYY','A10');


TRX_DATE could have a default format of YYMD, but PTRXDT will be "MM/DD/YYYY" in the COMT file.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.