Another Day of Week

  • 1
  • Question
  • Updated 8 months ago
  • Answered
Formula to extract day of the week from a date field.  Does anyone know how I can define a formula that returns Monday/Tuesday/Thursday etc from a date field? The only formula I can think of requires that I define a variable ( Sunday = Day (Date expression) + 7x; where x= integer between 0 and infinity)

It needs to be UI-field.  Here is a formula I found but skuid does not have "MOD".

CASE( MOD( Date__c - DATE(1900, 1, 7), 7), 0, "Sunday", 1, "Monday", 2, "Tuesday", 3,

"Wednesday", 4, "Thursday", 5, "Friday", 6, "Saturday","Error")

Any ideas?
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb

Posted 8 months ago

  • 1
Photo of Mike Dwyer

Mike Dwyer

  • 3,390 Points 3k badge 2x thumb
Try this:

DAY_NAME( {{Date__c}} )

(In your sample above, you may be missing the mustache notation on the field.)

You can get additional UI Formula references at https://docs.skuid.com/latest/en/skuid/models/ui-only-models-fields.html (Google: skuid formula)
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
In UI fields and today is Saturday 

I want to return days of week in 7 separate UI_fields

DAY_NAME( TODAY() )        returns Saturday
DAY_NAME( TODAY()-1 )     returns Friday
DAY_NAME( TODAY()-2 )     returns Friday
DAY_NAME( TODAY()-3 )     returns Friday
DAY_NAME( TODAY()-4 )     returns Friday
DAY_NAME( TODAY()-5 )     returns Friday
DAY_NAME( TODAY()-6 )     returns Friday
DAY_NAME( TODAY()-7 )     returns Friday

I must have formula wrong?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Lots of questions today Bill?   I answered your question here:  https://community.skuid.com/skuid/topics/day-name-formula-in-ui-field
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
That was it.  Thanks so much.