November 20, 2012, 05:49 AM
Deepu[CLOSED] if date val EQ '01/01/1900' then display null
Hi
i have date field in this formate(mdyy) from DB2 database
date_val(mdyy) formate 01/01/1900
03/21/2012
12/31/2011
01/01/1900
02/31/2011
01/06/2010
i want to display null when date_val is "01/01/1900"
date_val(mdyy) formate null
03/21/2012
12/31/2011
null
02/31/2011
01/06/2010
can any one suggest me how to do plz
Thanks
kumar.
This message has been edited. Last edited by: Kerry, November 20, 2012, 07:07 AM
atturhariDT_FLD/MDYY MISSING ON = IF DT_FLD EQ '01/01/1900' THEN MISSING ELSE DT_FLD;
November 20, 2012, 01:28 PM
Dan SatchellYou might need to add this to atturhari's suggestion:
SET NODATA = 'null'
Alternatively, you could convert your date to an alpha value in order to display 'null' where appropriate:
NEWDATE/A10 = IF (ORIGINAL_DATE EQ '01/01/1900') THEN 'null' ELSE DATETRAN(ORIGINAL_DATE,'(MDYY)','(/)','EN',10,'A10');