Is it possible to use the calculation field to ge the day of the week

  • beatsahead
    Asked on September 29, 2015 at 2:05 PM

    I currently have 3 different pricing structures

    Low - Mon-Thurs

    Mid - Fri/Sun

    High - Sat

    Is there any way to use the calculation field (or anything else) to select the correct day of the week when the user enters their date.

    It is further complicated that all of December is at high rate.

  • KadeJM
    Replied on September 29, 2015 at 3:15 PM

    I believe you are saying that you want to try to create a calculation that can obtain the appropriate day of the week based on the current date.

    You could use something like "  dateString (datefield0-9)  "

    Demo - http://form.jotform.us/form/52713738900153?   [CLONE IT!]

    Is it possible to use the calculation field to ge the day of the week Image 1 Screenshot 20

  • KadeJM
    Replied on September 29, 2015 at 3:16 PM

    I apologize, I meant to include this screenshot to show you the returned day name as well.

     

    Result:

    Is it possible to use the calculation field to ge the day of the week Image 1 Screenshot 20

  • beatsahead
    Replied on September 29, 2015 at 4:03 PM

    Thanks for your response, I had seen that formula, but just need the day from the date,

    and then 3 different calculation for different days of week, but think I've found a way to do it with conditions.

    I get the date field then equal to day. Working on it now.

  • KadeJM
    Replied on September 29, 2015 at 4:23 PM

    Yeah you'd need to create some conditional logic from this to then display the actual day of the week for each.

    I've fixed it in an update on the form I provided you with above and then have hidden the second date field. You

     

    Updated Demo: http://form.jotform.us/form/52713738900153 

     

    Additionally, you could combine it with the updated example to for your Low-Medium-High price per grade4pagas's added solution.

     

    Result:

    Is it possible to use the calculation field to ge the day of the week Image 1 Screenshot 30

     

    Conditions:

     

    Is it possible to use the calculation field to ge the day of the week Image 2 Screenshot 41

  • beatsahead
    Replied on September 29, 2015 at 4:49 PM

    They both look great, but not sure what I need to do to replicate, I have low mid high for the days of week, but unable to see how to set December as high?

  • beatsahead
    Replied on September 29, 2015 at 5:22 PM

    Got it

  • beatsahead
    Replied on September 29, 2015 at 5:27 PM

    Thought I had, but when I create Saturday condition for high I lose December

  • beatsahead
    Replied on September 29, 2015 at 6:41 PM

    Your [datestring] looks like a much neater solution than mine, but I do have it working, I had to put December in before the mid and low dates or they took priority.

    http://www.jotformpro.com/form/52715048682964

  • Chriistian Jotform Support
    Replied on September 30, 2015 at 2:54 AM

    Glad to hear that you have solved it already. If you have any further questions, feel free to contact us again.

    Regards.