displaying the current day on the screen #1410
-
Hello, I am struggling to get the current day of the week and display it on the screen (along with a survey box). Specifically, what I need to do is to display the last 4 days on the screen (one at a time), and ask people to write a few things regarding what happened on that day. I want to display the day of the week so that participants will know which day they should report about. I would really appreciate any advice. Thanks for reading this! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @belginunal, have you tried using the JavaScript |
Beta Was this translation helpful? Give feedback.
Hi @belginunal, have you tried using the JavaScript
Date.getDay
function? This function returns a number, where 0 = Sunday, 1 = Monday, etc. You could use that along with an array of the day names to get the current day name, and then subtract from the current day index to get the indices/names of the last 4 days. Feel free to post your code if you need further guidance.