What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Is there a way to pull only the month and year from a date field?

    Asked by oppgraphics on May 24, 2017 at 01:08 PM

    I want to pull the month and year from a date field into another field.

     

    Example:

    Date: 05-24-2017

    Field: 05-2017

     

     

    Is that possible?

  • Profile Image
    JotForm Support

    Answered by ashwin_d on May 24, 2017 at 02:54 PM

    Hello oppgraphics,

    Please note that you can use regular PHP date formatting in your form's thank you message and email alert to format the date in desired format. You can use the following code to separate the month and year form the date field:

    {date:F}

    {date:Y} 

    Where "date" is the name of the date field of form. Please check the screenshot below how to add this in thank you message and email alerts:

     

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!