craig_s Posted February 15, 2006 Posted February 15, 2006 I need to have a field automatically fill in a date that is 3 months past the date entered into another field. I have a calculation that does this for week days, making the date appear to be 4 days ahead of the date entered in another field (or more if the weekend gets in the way as it is not included. how do I modify the calculation to do this? Case( DayofWeek(Enquiry Date + 5) = 1, Enquiry Date + 5 + 1, DayofWeek(Enquiry Date + 5) = 7, Enquiry Date + 5 + 2, Enquiry Date + 5) Thanks for any help Craig
Raybaudi Posted February 15, 2006 Posted February 15, 2006 Case( DayOfWeek(Date ( Month(Enquiry Date) + 3 ; Day(Enquiry Date) ; Year(Enquiry Date) ) ) = 1; Date ( Month(Enquiry Date) + 3 ; Day(Enquiry Date) ; Year(Enquiry Date) ) + 1; DayOfWeek(Date ( Month(Enquiry Date) + 3 ; Day(Enquiry Date) ; Year(Enquiry Date) ) ) = 7; Date ( Month(Enquiry Date) + 3 ; Day(Enquiry Date) ; Year(Enquiry Date) ) + 2; Date ( Month(Enquiry Date) + 3 ; Day(Enquiry Date) ; Year(Enquiry Date) ) )
craig_s Posted February 15, 2006 Author Posted February 15, 2006 Thanks for that. I am just getting an error when trying to use it, I am told "Either an operator was omitted, this function can not be found, or "(" was not expected here. and it highlights this part of the calc (noted in [color:red]bold red) have i messed it up somehow? thanks for your reply. I have no clue about this kinda stuff. Case( DayOfWeek(Date ( Month(Due Date) + 3 [color:red]; Day (Due Date) ; Year(Due Date) ) ) = 1; Date ( Month(Due Date) + 3 ; Day(Due Date) ; Year(Due Date) ) + 1; DayOfWeek(Date ( Month(Due Date) + 3 ; Day(Due Date) ; Year(Due Date) ) ) = 7; Date ( Month(Due Date) + 3 ; Day(Enquiry Date) ; Year(Enquiry Date) ) + 2; Date ( Month(Due Date) + 3 ; Day(Due Date) ; Year(Due Date) ) )
Raybaudi Posted February 15, 2006 Posted February 15, 2006 Hi i missed to say you that you have to change all ";" into "," (my system accept the first one) So the right cal for you is: Case( DayOfWeek(Date ( Month(Due Date) + 3 , Day (Due Date) , Year(Due Date) ) ) = 1, Date ( Month(Due Date) + 3 , Day(Due Date) , Year(Due Date) ) + 1, DayOfWeek(Date ( Month(Due Date) + 3 , Day(Due Date) , Year(Due Date) ) ) = 7, Date ( Month(Due Date) + 3 , Day(Enquiry Date) , Year(Enquiry Date) ) + 2, Date ( Month(Due Date) + 3 , Day(Due Date) , Year(Due Date) ) )
craig_s Posted February 15, 2006 Author Posted February 15, 2006 Thanks mate, I will give it ago Craig
craig_s Posted February 15, 2006 Author Posted February 15, 2006 Great worked perfectly! thanks again Craig
Recommended Posts
This topic is 6920 days old. Please don't post here. Open a new topic instead.
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