Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date Computation Formula Post Reply Post New Topic
Author Message
hlecover
Newbie
Newbie


Joined: 24 Nov 2009
Location: United States
Online Status: Offline
Posts: 4
Quote hlecover Replybullet Topic: Date Computation Formula
    Posted: 02 Mar 2010 at 1:35pm
I'm trying to write a formula that will do the following for accounts receivable report, calculating a due date:
 
  • I need to take the invoice date, add 90 days, and then the invoice is due on the next 10th of the month

For example, invoice date is March 14; 90 days after that is June 14th (or thereabouts), and then the formula should return July 10th.

Howard
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Mar 2010 at 1:56pm

This should work:

if day(dateadd('d',90,{Date}))<11 then
dateserial(year(dateadd('d',90,{Date})),month(dateadd('d',90,{Date})),10) else
dateserial(year(dateadd('d',90,{@_Date})),month(dateadd('d',90,{Date}))+1,10)
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.