I have a table with different dates in a field named DOC_DATE format MM/DD/YYYY.
What I need is to create a new field from DOC DATE, named PAY_DATE, with the next friday to that date.
So I should get something like the following:
Is there any way to do that by script?
@AleRods88 Assuming your Date Field are in proper date format. You can try below
date(if(WeekDay(DOC_DATE,0)=4,DOC_DATE, WeekEnd(DOC_DATE,0,4)+1)) as PAY_DATE
View solution in original post
Thank you very much! It worked!!!