repartist Posted August 16, 2007 Posted August 16, 2007 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?
Ender Posted August 16, 2007 Posted August 16, 2007 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.
DesignX Posted August 16, 2007 Posted August 16, 2007 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
comment Posted August 16, 2007 Posted August 16, 2007 Answered here: http://filemakertoday.com/com/showthread.php?p=56879
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now