Splitting up the fields in a date field

  • ProductivityMedia
    Asked on October 27, 2016 at 6:50 PM

    I need to separate each of day, month and year into 3 fields from a JotForm date field.

    I need to utilize each field in different parts of my JotForm.

     

    Additionally, would like to be able to bring the 3 values back together to be used in a report

  • jonathan
    Replied on October 27, 2016 at 11:59 PM

    You can achieve this by transferring first the Date field value to a Textbox field. And then use the Substring widget split or concatenate the values.

    link: https://widgets.jotform.com/widget/substring

    I'll create a demo form with this in action. I'll be back shortly

     

     

  • jonathan
    Replied on October 28, 2016 at 12:11 AM

    Please try me demo form https://form.jotform.com/63009428251956

    Splitting up the fields in a date field Image 1 Screenshot 30

    --

    Splitting up the fields in a date field Image 2 Screenshot 41

    Let us know if you need further help.

  • ProductivityMedia
    Replied on October 28, 2016 at 3:25 PM

    Can I bother you for the coding that you used to perform the split.

    I have used current date as the Date field, i have used Text Date as the equivalent for Calculation but for what ever reason I am not getting values for the month, day and year fields. I am getting the fields but they are blank.

  • ProductivityMedia
    Replied on October 28, 2016 at 3:30 PM

    One further question - how to I hide these fields so that they do not appear on the form when in a web page?

  • ProductivityMedia
    Replied on October 28, 2016 at 4:43 PM

    Never mind - solved it on my own!

  • Mike_G JotForm Support
    Replied on October 29, 2016 at 6:07 AM

    Thank you for the update and we are glad to know that you were able to find a solution for your concern. Please feel free to contact us anytime if you have any other questions or concerns. 

    Thank you.