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

  • oppgraphics
    Asked on May 24, 2017 at 1: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?

  • Ashwin JotForm Support
    Replied on May 24, 2017 at 2: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:

    Is there a way to pull only the month and year from a date field? Image 1 Screenshot 20

     

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!