how to get date part from datestart in espo crm

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • imjpmaurya
    Junior Member
    • Oct 2016
    • 7

    how to get date part from datestart in espo crm

    I am creating call invitation template and want to show there date only not datestart. what is keyword for this?
  • item
    Active Community Member
    • Mar 2017
    • 1476

    #2
    Hello,



    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

    Comment

    • imjpmaurya
      Junior Member
      • Oct 2016
      • 7

      #3
      I am using Version 5.5.1 and want to formate data in the Invitation Call template. If I change {{dateStart}} with something else on sending Invitation giving error "Bad Server Response"

      Comment


      • esforim
        esforim commented
        Editing a comment
        If you are using 5.8.0 or higher, here is what you need to use. PS: I dont think it work for email template?

        Using this as reference: https://github.com/espocrm/documenta...ime-formatting

        This code is in the example, but we want it for {{dateStart}} ------> {{dateFormat now_RAW format='MMMM DD, YYYY HH:mm'}}
        So new code is:

        {{dateFormat dateStart_RAW format='MMMM DD, YYYY HH:mm'}}

        Now use this https://github.com/espocrm/documenta...-formatting.md
        If you want to format in whichever you want. For example, instead of MMMM, you can change it to MM in the code above.
    • Maximus
      Senior Member
      • Nov 2018
      • 2731

      #4
      Hello,
      you can make a workaround. Create a new 'date' type field for the Call entity. Then using Formula push to this field a date value from the dateStart field. Afte, you will be able to choose this field for your template.
      Note that Formula uses the beforeSaveScript that means you need to press save button to run formula. For the existed records to run Formula you need to make some changes and press save. For the new records, the date value will be set automatically upon new record creation.
      I suggest you to upgrade your EspoCRM instance. Many enhancements were embedded for the last year https://forum.espocrm.com/forum/announcements.

      Comment

      Working...