Focal Point
[SOLVED] Date format

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

January 25, 2019, 08:32 AM
Krishna.edara
[SOLVED] Date format
Hi,
I have date format "20190123000000000" in the system and I used
 COMPUTE BATCH_DATE1/MDYY = HDATE(BATCH_DATE, 'MDYY');  AS 'BATCH_DATE' 
the out put I`m getting '1232019', but my requirement is the data format should be "01/23/2019",

This issue is only with CSV format, HTML and EXL07 are doing good


Appreciated any help to change the format.

Thanks,
krishna

This message has been edited. Last edited by: FP Mod Chuck,


WebFocus-8/Windows/HTML, PDF, EXCEL
January 25, 2019, 09:05 AM
Wep5622
Have a look at HCNVRT().


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 25, 2019, 09:42 AM
Krishna.edara
Hi Wep5622,
Thank you for your reply, it is working fine but I`m still getting the time, here is my code
and my output
 COMPUTE  PAYMENT_DATE1/A20 = HCNVRT(PAYMENT_DATE, '(HYYMDS)', 20, 'A20');AS 'PAYMENT_DATE1' 

output: 10/28/2018 12:00:00 AM
I need only date part (10/28/2018) only, how can I control this?

Thanks,
Krishna


WebFocus-8/Windows/HTML, PDF, EXCEL
January 25, 2019, 10:26 AM
Krishna.edara
I Fixed it using EDIT function to mask the time,

Thanks,
Krishna


WebFocus-8/Windows/HTML, PDF, EXCEL