Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Date Calculation


gmigoni

Recommended Posts

Im breaking my head with this issue:

 

Im building an application to control my sales projects, what i need is to get the payment date depending on the "authorization_date"

 

I have a field "authorization_date" this is the date when my customer accept the project (website). So i have a schedule payment which will be calculated based on the aut-date.

 

My customer needs to pay me every 15 days (15 of everymonth or 1st of everymonth)

 

So if the "authorization_date" it's after the 15th will be display on the "payment1" field the comming 1st.

and

if the "authorization_date" it's before the 15th will be dislpay on the "payment1"field the comming 15th.

 

ANY IDEA????

 

THANKS

GIAN

Link to comment
Share on other sites

try

Case 
( 
  Day ( AuthDate ) < 15 ; 
  Date ( Month ( AuthDate )    ; 15 ; Year ( AuthDate) ) ;
  Date ( Month ( AuthDate ) +1 ;  1 ; Year ( AuthDate) ) 
)

please test thoroughly before deploying.

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use