Skip to main content
Question

Last Friday of the Current Month

  • July 12, 2021
  • 0 replies
  • 64 views

I am needing help in finding a formula for a Formula-Date field to show the last Friday of the Current Month by default when adding a record.  I appreciate any help with this!

------------------------------
Tanya Hammil
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
Try this as a formula date field, and then have a form rule that says if your date field is blank to make it be the value in this field.

var date LDOM = LastDayOfMonth(today());

var number DaysToBackUp = IF(
DayOfweek($LDOM)=5,0,
DayOfweek($LDOM-days(1))=5,1,
DayOfweek($LDOM-days(2))=5,2,
DayOfweek($LDOM-days(3))=5,3,
DayOfweek($LDOM-days(4))=5,4,
DayOfweek($LDOM-days(5))=5,5,
DayOfweek($LDOM-days(6))=5,6);

$LDOM - Days($DaysToBackUp)

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------