Get day name by date

Hi, I have this date coming from a date picker. 01/30/2023

how can I know what day it is?

Ex.
01/30/2023 - MONDAY

Hi there, @guybean… one way you can go is to create an option set that has the days of the week and an attribute for each option’s day number (each day has a corresponding number, with Sunday=0, Monday=1, Tuesday=2, etc). Then, extract the day from the date picker’s date and get the option from the option set where the day number attribute matches the date’s day, and you’ll be good to go.

Hope this helps.

Best…
Mike

Edit: If it helps, here are a couple of screenshots. Here is what the option set would look like, and you would modify the attribute of each option and enter the associated day number.

Here is the expression in a text element that would get the day of the week associated with a date/time picker’s value.

You can use the operator :Extract (Day) on a date to get the day of the week.

The days are represented by a number, from 0-6, with 0 being Sunday and 6 being Saturday.

The simplest way would then be to create an Option set of Days, with the corresponding Day number, then use that do display the name of the day.

2 Likes

Format date as dddd ?

3 Likes

Well, now I just feel stupid. How did I not know about that before now?!? Thanks, @veeslop!

2 Likes

Format date as dddd ?

Yeah… or that - much simpler than mine and @mikeloc’s suggestion :rofl:

good call @veeslop

2 Likes

Thanks Guys… Problem Solved :smiley: