Skip to main content
Question

Please assist with date formula?

  • April 13, 2018
  • 0 replies
  • 50 views

Forum|alt.badge.img+11
The formula below the line works fine.  Now, I need to add the other scenario which is:
If the customer name is NVR and ifinvoice is submitted within the week (Friday being the last day), payments for those submittals will be paid 30 days after the friday submittal deadline....

If([Customer Name],"nvr"),                                         
   FirstDayofPeriod([DW 1 BILLED],Weeks(1),Date(2018,4,6))+Days(30),
_____________________________________________
var date BillingDate = [DW 1 BILLED];
var date SameDayNextMonth = (AdjustMonth($BillingDate,1));

If(Day($BillingDate) <= 15, Date(Year($SameDayNextMonth), Month($SameDayNextMonth),10),
                                           Date(Year($SameDayNextMonth), Month($SameDayNextMonth),25),

  • Registered
  • April 13, 2018
in order to have a 'rolling' formula that says 'within the week', we need to know the two dates.

If one date is [DW 1 BILLED]  what is the other date that needs to 'be within the week' of?

Forum|alt.badge.img+11
  • Author
  • Registered
  • April 13, 2018
It is the same field for both customers [DW 1 BILLED]. That is why I need an IF [Customer Name] is customer 1, then....use date formula 1,
Otherwise, use date formula 2

Forum|alt.badge.img+11
  • Author
  • Registered
  • May 9, 2018

This works fine for Customer 1 [SM JOB]

var date BillingDate = [DW 1 BILLED];

var date SameDayNextMonth = (AdjustMonth($BillingDate,1));

 

If(Day($BillingDate) <= 15, Date(Year($SameDayNextMonth), Month($SameDayNextMonth),10),

                                           Date(Year($SameDayNextMonth), Month($SameDayNextMonth),25))

Now, I need a different date result for Customer 2

IF([NVR JOB]=true,

...the return date needs to be 30 days after the billing date.

Please advise...I cannot seem to get () in correct places.  thx