Method Community

 

Date format in email templates

Last post 09-10-2014 12:02 PM by Method_Greg. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-29-2014 3:11 PM

    Date format in email templates

    Hi...

    Is there a way, in an email template, to change the format of the date and time when using the field Activity.DueDateStart? Currently, the format gives us Jun-30-2014 05:41 PM, but we'd like to change it to June 30, 5:41 PM. can anyone help?

    Many thanks, Gregg

  • 07-09-2014 10:30 AM In reply to

    Re: Date format in email templates

    Hi Gregg,


    Sorry for the delayed reply. The first thing you will want to do is create a custom field in your Activity table to store the new date format. In order to change the date format, you will need to retrieve the DueDateStart from the Activity table for the record you are working on. You will then need to use the Date Function to format the date the way you would like and store it in an Action Result. In your case it would be “MMM dd, hh:mm tt”.

    Date Format

    You will then insert the Action Result into the custom field you created on the Activity table. You can then insert the custom field into your email template.

    -Audisho

    Audisho Sada
    Product Manager
    Method:CRM
    a.sada@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
  • 09-10-2014 10:35 AM In reply to

    Re: Date format in email templates

    Maybe it’s because I am a newbie, but I can’t make this work. 

    Could you break it down into steps for me, something like this:

    Step One: Go to Customization>Tables/Fields>Activity>Edit Fields>Make new field (I got that far!)

    * Step Two: Etc.

    Your instructions below assume a lot of previous knowledge I just don’t have…YET! (But I am learning fast and I’m blown away by what we can do…) 

    When you say below things like “You will then insert the Action Result into the custom field you created on the Activity table” – I just have no idea how to do that.

    Thanks, Gregg

  • 09-10-2014 12:02 PM In reply to

    Re: Date format in email templates

    Hello Gregg,

    Step 1: Go to Customization > Tables/Fields > Activity > Edit Fields

       Make a new field. Say EmailStartDate that is a DateTime.   Click Add Field > Finished Editing Fields.

    Step 2: Modify the invoice screen to save a value into your custom field with the proper formatting.

        Assuming you have done a straight copy of the Activity screen, go to the screen designer for the page.  Mine is CRM_NewActivity(2).  Find the first Save button in the first sectionClick Edit and go to the action list.  Add the Date function (see Aushido's post) and an Update Field in Table action. (You can do an Enter Value Into Field On Screen action.  You would need to put EmailStartDate on the screen and hide it.  Also, the action would have to go before the Save All Sections action in the Save button.).  Move both actions before the Save All Sections action in the Save button.  Click Publish.

    Here is the Update Field in Table action.  It gets the current record from the Activity table and adds the date with the formatting defined in the Action Result.

    Here are the two actions together.





    Step 3: Add the field to the email template using Activity.EmailStartDate.

    Greg Bilous
    Community Support Specialist
    Method Integration
    g.bilous@method.me
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400 ex.756
    Fax: 416.640.6027
Page 1 of 1 (4 items)