When you subtract one, the value of the variable gets cast as a number,
effectively dropping the leading zero.  Try this:

FMT(OCONV(@DATE,'DM')-1,'2"0"R')

Larry hiscock
Western Computer Services


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lettau, Jeff
Sent: Friday, February 08, 2008 8:35 AM
To: [email protected]
Subject: [U2] OCONV DATE ISSUE.

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
ERP Systems Manager
polkaudio




  ________________________________
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/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to