How do I change the {selectDate} date format in emails

  • alliphil
    Asked on June 18, 2024 at 3:16 PM

    I'm using the appointment element for my form. Currently when the confirmation emails and reminder emails go out, the date is using {selectDate} and is in the format:

    Tuesday, Jun 25, 2024 11:00 AM-12:00 PM

    How do I change it to the format:

    Tuesday 6/25/24 11:00 AM-12:00 PM

    Also, I have the time set to Eastern but it does not say Eastern when the confirmation emails go out. Is there a way for it to automatically include the time zone?


  • Eliza JotForm Support
    Replied on June 18, 2024 at 3:43 PM

    Hi Allison,

    Thanks for reaching out to Jotform Support. You can change the date format in the email notifications to have a result like the one in the screenshot below:

    How do I change the {selectDate} date format in emails Image 1 Screenshot 30

    If it works for you, here's how to do that:

    1. In Form Builder, click on Settings in the orange navigation bar at the top part of the page, and go to Emails.
    2. Hover your mouse over the Autoresponder Email, and click on the pencil icon.
    3. Change {Date} to {DATE:l, jS \o\f F Y \a\t g:i A}.
    4. Click on Save. You can do the same for the Notification Email.

    How do I change the {selectDate} date format in emails Image 2 Screenshot 41

    As for your other question, I've moved that to a new thread. You can check that out here. I'll post my answer shortly.

    Let us know if you have any other questions.

  • alliphil
    Replied on June 18, 2024 at 4:13 PM

    Ok, for clarification, the instructions above says:

    1. Change {Date} to {DATE:l, jS \o\f F Y \a\t g:i A}.

    But my form says {SelectDate} and not {Date}

    Did you mean change {SelectDate} to {DATE:l, jS \o\f F Y \a\t g:i A}

  • Mightor JotForm Support
    Replied on June 18, 2024 at 4:51 PM

    Hi alliphil, 

    If you customized the Field Label of the Date Picker field to 'Select Date', then you must use:

    {selectDate:l, jS \o\f F Y \a\t g:i A}

    {Date} is the default Unique Name of a Date Picker field. You can check your Date Picker fields Unique Name by following the steps below:

    1. In Form Builder, select the Date Picker field and click on its Gear icon.
    2. Then, go to the Advanced tab.
    3. Click on Field Details and check the value under Unique Name.

    How do I change the {selectDate} date format in emails Image 1 Screenshot 20

    Let us know if you have any other questions.

  • alliphil
    Replied on June 18, 2024 at 5:08 PM

    Actually, I did not customize the field. It is the Appointment Element.

    When I use the "Form Fields" to choose the field, and I choose the Appointment field, it automatically labels it as {SelectDate}.

    So would I just use {selectDate:l, jS \o\f F Y \a\t g:i A}

    Also, is there somewhere that explains what all the parts of the customized date means?

  • Ronald JotForm Support
    Replied on June 18, 2024 at 5:19 PM

    Hi alliphil, 

    You can refer to our guide on how to add a date to an email template at this link. Additionally, by exploring the PHP language, you can learn more about dates with the manual they provided on this guide.

    Reach out again if there’s anything else we can help you with.

  • alliphil
    Replied on June 18, 2024 at 5:32 PM

    Thank you for the guides. They seem to all refer to {DATE}.

    Do all of those instructions work for the Appointment Element which uses {SelectDate}?

  • Mafe_M JotForm Support
    Replied on June 18, 2024 at 6:19 PM

    Hi alliphil, 

    When I cloned and tested your form, the same thing happened for me. When you use the unique name {selectDate}, it will not display the correct date format that you wanted to use.  After investigating it a bit, I found a solution. What you can do is to change the unique name of the appointment field from {selectDate} to {Date}. After that, apply the format {DATE:l, jS \o\f F Y \a\t g:i A} in the notification email. Let me show you how:

    I. Change the unique name of the Appointment field.

    1. In Form Builder, select the Appointment field and click on its Gear icon.
    2. Then, go to the Advanced tab.
    3. Click on Field Details and check the value under Unique Name.
    4. Update it from {selectDate} to {Date}.

    How do I change the {selectDate} date format in emails Image 1 Screenshot 40

    II. Change the date format in the notification email.

    1. In Form Builder, on the orange navigation bar, click Settings and go to Emails.
    2. Hover your mouse over the Autoresponder Email, and click on the pencil icon.
    3. Change {Date} to {DATE:l, jS \o\f F Y \a\t g:i A}.
    4. Click on Save to apply the changes made.

    How do I change the {selectDate} date format in emails Image 2 Screenshot 51

    Here is the result:

    How do I change the {selectDate} date format in emails Image 3 Screenshot 62

    Give it a try and let us know how it goes.


  • alliphil
    Replied on June 19, 2024 at 2:23 PM

    Thanks for the instructions on how to change the Unique name to {Date}. I'll give that a try but also wanted to clarify that my original question was how to get the date into this format:

    Tuesday 6/25/24 11:00 AM-12:00 PM

    Also, from within the Advanced tab in the Appointment element, it allows you to set up an automated reminder 24hrs in advance of the appointment. However, I don't see a way to put the shortened format of the date into the subject field inside of the automated reminders within the Appointment Element. Is that possible?


  • Mafe_M JotForm Support
    Replied on June 19, 2024 at 2:51 PM

    Hi alliphil, 

    Unfortunately, we do not have that format, but the closest would be the Wednesday, 19th of June 2024 at 6:03 AM EST. Also, it is not possible to customize the reminder email in the appointment widget. You can only use form fields as the subject. 

    Reach out again if there’s anything else we can help you with.

  • alliphil
    Replied on June 19, 2024 at 6:08 PM

    Thanks for the reply. From the link provided above, it looks like this is an option closer to what I'd prefer:

    {DATE:Date-US}  which looks like Feb 7, 2011  

    If I change the unique name of the Appointment widget to {Date} (as suggested previously), will {DATE:Date-US} work in the body of both confirmation emails and automated reminders from the Appointment widget?


  • alliphil
    Replied on June 19, 2024 at 6:18 PM

    There's also: {DATE:Full-US} Feb 7, 2011 at 5:17:05 AM  which would probably be closer to the shortened version I'd prefer.

    However, I didn't know if changing the unique name in the Appointment widget to {Date} allows me to use this date format in the body of automated reminder emails and also autoresponders. Do let me know.

  • Kelvin JotForm Support
    Replied on June 19, 2024 at 7:54 PM

    Hi Allison,

    Sure, you can use the date format you prefer. Here are the date formats mentioned, including examples:

    • {DATE:Date-US} - Jun 19, 2024  
    • {DATE:Full-US} - Jun 19, 2024 at 5:00:00 PM

    The Appointment form element has a Unique Name (i.e. {appointment}) to show the date and time of the appointment. Unfortunately, it's currently not possible to alter this date format. Even if you change the Appointment Unique Name from {appointment} to {date}, you won't be able to use the predefined parameters from {DATE}. With this change, it'll cause a conflict with the default Unique Name {DATE} showing the appointment's date and time instead of the form submission date. I wouldn't recommend doing this.

    You might also want to check out this guide about How to Find Field IDs and Unique Names.

    Give it a try and let us know if you have any other questions.

  • alliphil
    Replied on June 20, 2024 at 11:10 AM

    OK thank you. Given what you shared, it seems that some of the advice provided previously in this thread was inaccurate.

    Nonetheless, thanks for the clarification - essentially the answer to my original question is that the date format cannot be altered at all when using the appointment widget.

 
Your Answer