Store a date in a specific format after entering in another format and doing calculation against it

  • Profile Image
    uofm_matt
    Asked on November 18, 2017 at 11:46 AM

    I'd like to enter a date in format MM/DD/YYYY in my form and then be able to calculate against that date, say MM/DD/YYYY - 45 days, and then put the resulting data into a different format, MMM DD, YYYY, in another field.  I need this format, MMM DD, YYYY in the database, versus the standard date and then present it via jotform formatting (say in a jotform email).

  • Profile Image
    Richie_P
    Answered on November 18, 2017 at 01:37 PM

    Hello,

    It seems that the Date-Format available to JotForm forms are as follows:

    And yes you can calculate the result of a date with conditions.

    To be able to do this we need a short text entry and conditions

    Place a short text entry in between two date picker then go to settings>conditions

    Update/Calculate Field.


    IF >the short text entry then make state as Filled after in the Do choose Calculate a field's value add the date field and subtract it with 45 and the summary would be your second date picker

    .

    Create another condition and in the IF put your date and state to isFilled, in the DO select calculate a fields value. Click the ... where the date string value can be found.

    Add the date field inside

     

    and summary to your short text entry.

    Hopefully this information helped you.

    Here is the link to my sample form:https://form.jotform.com/73214806889972

    Regards.


  • Profile Image
    uofm_matt
    Answered on November 19, 2017 at 10:02 PM

    Apparently this will not submit the date in MMM DD, YYYY format to the database though, no?  If no, can we submit a feature request to put a custom defined date in the database?  Others may have this need for whatever format they want.

  • Profile Image
    Kiran
    Answered on November 20, 2017 at 06:19 AM

    Please note that all the fields available on the form will be storing the data from the fields whatever entered/available at the time of submitting the form. Since the date conversion is being converted on a different field using a condition based on the date entered, the field data will also be available in the form submission data. You may clone the form provided by our colleague to your account and see how it works.

    Let us know if you are referring something different. We will be happy to help.