May 21, 201015 yr Hi all. We enter orders the day after they are sold. I would like to auto populate a field to accurately reflect the date sold. So Tuesday through Friday I need it to populate current date - 1. But the tricky part is that on Mondays I would like it to populate current date - 3 to show that it was sold on Friday. Could someone help me out with a formula to do this? Thanks
May 21, 201015 yr if you have a field called "CreationDate" which is the day the orders are entered, you could do this for the "DateSold" field: Case ( DayOfWeek(CreationDate)=2; CreationDate-3; CreationDate-1)
May 21, 201015 yr Author I do have a creation date field and this appears to do the trick. Thanks so much for the help :
May 21, 201015 yr Then I guess I didn't understand the request because if the date is 5/9 (Sunday), it produces Saturday. I would think you would want Friday. If you want to skip both weekend days then try: CreateDate - 1 - Position ( "12" ; DayOfWeek ( CreateDate ) ; 1 ; 1 )
Create an account or sign in to comment