cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jamesmatson
Level: Powered On

TIP: Creating human readable days of week for a graph or table.

I have found the following formula super helpful to turn dates or day of week numbers into readable days (e.g. Monday, Tuesday).  Try it out and see how you go! Smiley Happy 

 

AddColumns(
    selectedStoreSalesOverTime,
    "SalesDay",
    Switch(
        Text(Weekday(DayOfInsert)),
        "1",
        "Sun",
        "2",
        "Mon",
        "3",
        "Tue",
        "4",
        "Wed",
        "5",
        "Thu",
        "6",
        "Fri",
        "7",
        "Sat"
    )
) 
1 REPLY 1
samuelJ
Level 8

Re: TIP: Creating human readable days of week for a graph or table.

You can also use built in Text() function second parameter to achieve this a little easier.  

Text(someDateValue, "ddd, mmm dd")

This will produce "mon, Oct 22" or:

Text(someDateValue, "dddd, mmm dd")

to achieve "Monday, Oct 22".