And will you have issues doing that math for January since 01-1 = 0?

Caryl

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Phillips
Sent: Friday, February 08, 2008 9:29 AM
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/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to