Can we calculate/present a week number?

  • Profile Image
    Roel1985
    Asked on January 09, 2017 at 02:29 AM

    Hello,

    Is it possible to show a weeknumber. When i enter a date the form can calculate the week number?

     

    Thank you,

  • Profile Image
    Charlie
    Answered on January 09, 2017 at 04:41 AM

    What week number are you referring to? Is it the week number on a month or the whole year?

    We do not have a direct function that presents a week number, but if you are familiar with its formula, I believe you can use the form calculation widget or the conditional logic to get it. Here are the guides that might help:

    https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget 

    https://www.jotform.com/help/268-How-to-Insert-Text-or-Mathematical-Calculation-into-a-Field-Using-Conditional-Logic 

     

    We'll wait for your response.

  • Profile Image
    Roel1985
    Answered on January 09, 2017 at 05:11 AM

    Hello,

     

    I refer to the weeknumber each year has 52 or 53 weeks. Like this year 2 jan 2017 - 8 jan 2017 is week 1 of this year.

  • Profile Image
    Mike
    Answered on January 09, 2017 at 06:45 AM

    Unfortunately, we do not have an existing function or example to provide you with. In theory, it might be possible to use some set of calculation rules to calculate the week number depending on one of the standards, but we still cannot guarantee that.

    It might be easier to use some tested solution, for example it might be possible to use a form source code and custom javascript to calculate the week number. Please see the next article for more information on this topic.

    Calculate ISO 8601 week and year in javascript

    Thank you.