Day of the WeekDay of the Weekhttps://portal.smartbuilder.com/c/message_boards/find_thread?p_l_id=&threadId=5198842024-03-29T00:13:24Z2024-03-29T00:13:24ZRE: Day of the WeekScott Sheridanhttps://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&messageId=5201382022-03-25T13:40:25Z2022-03-25T13:40:25ZThat's great! Thanks very much, Nav. <br />ScottScott Sheridan2022-03-25T13:40:25ZRE: Day of the WeekNavdeep Dhillonhttps://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&messageId=5200292022-03-24T19:45:26Z2022-03-24T19:40:35ZHi Scott, <br />I don't think the weekday is part of the built in getTime function. We'll have to check with the dev team if it is.<br /><br />Instead, you can define your own javascript function. There's two ways to do this - one is by registering your own custom function, and one is to use an IFrame. We'll go with the IFrame approach since this custom javascript is pretty limited in scope. And with the IFrame, you can set it and forget it. FYI, SmartBuilder calls an IFrame a "Web Object" - I use the terms interchangeably.<br /><br />Check out the attached lesson and image - it should even work in Preview. You can copy the Wrb Object into your lesson, and the javascript inside should come with it (you can make it smaller and hide it offscreen - it still needs to Start Visible, though). Then create a similar action from the Web Object block to set your variable. Keep in mind that "onPageLoad" as a trigger might happen before the Web Object has a chance to load, so we're using "Web Object.onShow". The blue "get data" block comes from the Web Object's flyout panel.<br /><br />That ought to do it! Let us know if you have any questions.Navdeep Dhillon2022-03-24T19:40:35ZRE: Day of the WeekScott Sheridanhttps://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&messageId=5199762022-03-24T13:19:00Z2022-03-24T13:17:38ZHi Nav, <br />I worked with John on something else a few weeks ago where we pulled the date and time in MM/DD/YYYY HH:MM format using the blocks below (they have been modified a bit to fit what I'm doing).<br /><br />At the moment I'm working on a project where a user needs to access their calendar and was hoping to have the actual day of the week show up. If I wanted to go with the code provided above, how would I go about doing that?<br /><br />Thanks, <br />ScottScott Sheridan2022-03-24T13:17:38ZRE: Day of the WeekNavdeep Dhillonhttps://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&messageId=5199082022-03-23T20:44:48Z2022-03-23T20:44:43ZHi Scott,<br />How are you pulling in the date? With the built-in registered function, or via an IFrame? This might help: <a href="https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_date_weekday">https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_date_weekday</a><br /><br />Let us know the exact format that you're after (and is it today's day?), and how you're currently getting the date, and we can help guide you.<br /><br />- NavNavdeep Dhillon2022-03-23T20:44:43ZDay of the WeekScott Sheridanhttps://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&messageId=5198832022-03-23T19:13:23Z2022-03-23T19:13:23ZHello Team! <br />I've been able to pull dates and times into my lessons, but I'd like to know if there is any way of pulling the day of the week. Is this something that is possible? <br />Thanks! <br />ScottScott Sheridan2022-03-23T19:13:23Z