Steve,
When I am running financial reports, the user keys in the selected month
ending date, which is (.vpe).  The variable (.vfye) is retrieved from the
company table and is the integer month.  Here's what I do from there:

   set v vper =
(((int(sget(format(.vpe,'mm/dd/yyyy'),4,7)))*100)+(imon(.vpe)))
   if vfye = 12 then
    set v vpb = (((int(sget(format(.vpe,'mm/dd/yyyy'),4,7)))*100)+1)
   else
    set v vpb = (ifgt((imon(.vpe)),.vfye,+
     (((int(sget(format(.vpe,'mm/dd/yyyy'),4,7)))*100)+(.vfye+1)),+
     ((((int(sget(format(.vpe,'mm/dd/yyyy'),4,7)))-1)*100)+(.vfye+1))))
   endi

It took me awhile to get this working right, and hope it helps!!!

Jan (in Charlotte!!!)


Reply via email to