OCONV(@DATE, "DMZ") will remove the leading zero.

Thanks,
David A. Green
www.dagconsulting.com
(480) 813-1725


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

Thanks, I did OCONV(@DATE, 'DM')-0 to make the other date the same or I
should answer that they are now both numeric.  Rather than formatting.
Data types changing behind the scenes are not always obvious when your
working on something.

Jeffrey Lettau
ERP Systems Manager
polkaudio


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Phillips
Sent: Friday, February 08, 2008 12:29 PM
To: [email protected]
Subject: Re: [U2] OCONV DATE ISSUE.

Hi 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?

OCONV returns a character string result. Using it in an arithmetic
expression converts it to a number. Hence 02 minus 1 is 1, not 01.

There are various ways to get what you want. One would be
FMT(OCONV(@DATE, 'DM')-1, 'R%2')


Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200
-------
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/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to