THAT IS WHAT I WAS LOOKING FOR! Rather than doing this... IF OCONV(@DATE, 'DM') - 1 < '1' THEN OCONV(@DATE, 'DY') - 1 : OCONV(@DATE, 'DM') - 1 ELSE OCONV(@DATE, 'DY') - 1 : OCONV(@DATE, 'DM') - 1; (OCONV(Inv_So_Date, 'DY') : OCONV(Inv_So_Date, 'DM')-0); IF B$Record_Type = 'BK' THEN IF @1 = @2 THEN Qty ELSE '0' ELSE '0'
I can do IF B$Record_Type = 'BK' THEN IF OCONV(ADD_MONTHS(@DATE,-13),'DYM') = OCONV(Inv_So_Date,'DYM') THEN Qty ELSE '0' ELSE '0' That is soooo much smaller. Jeffrey Lettau ERP Systems Manager polkaudio -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Colin Alfke Sent: Friday, February 08, 2008 1:07 PM To: [email protected] Subject: RE: [U2] OCONV DATE ISSUE. In UD you can look at @MONTH and ADD_MONTHS(date,nbr) which should help having to do the gymnastics Martin and Bryan brought up.... hth Colin Alfke Calgary Canada -----Original Message----- From: Lettau, Jeff The question is when I do OCONV(@DATE, 'DM') I get 02 but when I do OCONV(@DATE, 'DM')-1 I get 1 not 01. Why? And how do I get these to match? The reason for this is I'm trying to do this as a i-desc But my dates don't equal because of the weird oconv issue. IF OCONV(@DATE, 'DM') - 1 < '1' THEN OCONV(@DATE, 'DY') - 1 : '12' ELSE OCONV(@DATE, 'DY') : OCONV(@DATE, 'DM') - 1; (OCONV(Inv_So_Date,'DY'):OCONV(Inv_So_Date,'DM')); IF B$Record_Type = 'BK' THEN IF @1 = @2 THEN QTY ELSE '0' ELSE '0' I'll take a better solution if someone has it since I have to do this for 36 months making 36 i-desc to put it in columns for my output that will need to be grouped and summed. Jeffrey Lettau ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ Disclaimer: This email may contain confidential and/or privileged information. It is intended only for the person or persons to whom it is addressed. Any unauthorized review, use, or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email or telephone and destroy all copies of the original message. ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
