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/
