Getting the day of the Week based on a specific Date not being No

Hi everyone!

I’ve been trying to get the day of the week (3 first chars) for a specific date given by a Date Picker.
I’ve seen a lot of exemples using getDayOfWeek() but it’s always used with now…

How can I get the day of the week for a Date I’m generating myself?

I tried something like this but no luck :confused:

I just put a random date as an example as I can generate the date in a string format pretty easily.

Thanks in advance for your help!!


Your logic is sound, but I don’t think you’re providing the date string correctly. See Page 2 of this .rp file, and enter your same string as above. It works for me.

DateChecker.rp (96.1 KB)

…although it doesn’t always work correctly in a true date picker (on Home pagel, as in a text field with input type of ‘Date’ --which I’m still trying to figure out…

Thanks for your reply!
You were right regarding the date format.

I actually figured it out by using an hidden widget, populating the date generated by the date picker in the widget, then using its text as a temporary variable to compute the day of the week.

Seems like a weird work-around but it worked.