Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add a month to a period format

Status
Not open for further replies.

nisccrystal

Programmer
Feb 11, 2005
4
US
Hi,

I'm using crystal XI and I'm trying to add a month to a current period (201010) desired result (201011). I need to make sure this works when we go into the next year. Example (201012) plus one month = (201101).

Has anyone tried anything like this before?

Thanks!
 
Is your period field a number or a string?

-LB
 
numbervar x := {table.period};
stringvar y := totext(x,0,"");
if right(y,2) = '12' then
x + 89 else
x + 1

Then format the number to result in no decimals.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top