>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?
I saw this trick once. Might be adaptable. The idea is to make a string of month numbers and do an index. Only way I can think of to avoid creating/maintaining 36 i-descs is to write a program. S = '010203040506070809101112' PRINT SUBSTRINGS(S,INDEX(S,OCONV(DT,'DM'),1)-2,2) Brad U.S. BANCORP made the following annotations --------------------------------------------------------------------- Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation. --------------------------------------------------------------------- ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
