{{tag>Function Function_List Date_And_Time Version:v8.1}} ====== PREV_DAY_OF_WEEK ====== ===== Description ===== Returns the previous day of the week closest to the specified date ===== Syntax ===== ''PREV_DAY_OF_WEEK (date, day)'' Cannot be used in the condition of a [[:ref:a_f:a:find|FIND]] action. ===== Parameters ===== An expression producing a date and a string identifying the day ===== Returns ===== **Date**: the closest previous date that falls on the named day of the week. ===== Example ===== Object.PrevDay = PREV_DAY_OF_WEEK (CURRENT_DATE, 'Tuesday') /** This returns previous Tuesday from current date*/ ===== Related ===== [[ref:a_f:f:af:next_day_of_week|NEXT_DAY_OF_WEEK]], [[ref:a_f:f:af:day_of_week|DAY_OF_WEEK]], [[ref:a_f:f:af:start_of_week|START_OF_WEEK]], [[ref:a_f:f:af:end_of_week|END_OF_WEEK]]