August 16, 200718 yr I've been using this calculation for years with V6 and earlier versions: If(terms = "First of Month" , DateToText( Date(Month(Invoice Date) + 1,Day("1"),Year(Invoice Date))) ,If(terms = "Upon Receipt", Invoice Date ,If( terms = "30 Day", Invoice Date + 30, DateToText( Date(Month(Invoice Date) ,Day("15"),Year(Invoice Date)))))) When I converted to 8.5 the calculation changed to: If(terms = "First of Month" ; GetAsText( Date(Month(Invoice Date) + 1;Day("1");Year(Invoice Date))) ;If(terms = "Upon Receipt"; Invoice Date ;If( terms = "30 Day"; Invoice Date + 30; GetAsText( Date(Month(Invoice Date) ;Day("15");Year(Invoice Date)))))) It returns a value of "?" instead of a due date. I've been fooling around for the last 4 hours trying to fix this. Any ideas?
August 16, 200718 yr If the calc's result is a Date, you should use getasdate() instead of getastext(). Also, you don't need to use Day("1") and Day("15"). You can use 1 and 15, respectively.
August 16, 200718 yr Case(terms = "First of Month" ; GetAsText(Date (Month ( Invoice Date )+1; "1" ; Right ( Invoice Date ; 4 ) )) ; terms = "Upon Receipt"; Invoice Date ;If( terms = "30 Day"; Invoice Date + 30; GetAsText( Date(Month(Invoice Date) ;Day("15");Year(Invoice Date))))) try that as your Due Date Calc it works for me no problem
Create an account or sign in to comment