How to add datetime\addWeeks to formula

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nishan Perera
    Active Community Member
    • Jan 2019
    • 348

    How to add datetime\addWeeks to formula

    Hi,

    I need some help on "datetime\addWeeks" since I want to show the week number of the created date on call. Could you please help me on this ? I have tried on formula, but no idea how to do that. Please help.

    Thank you.
    Cheers!
    Nishan.
  • Nishan Perera
    Active Community Member
    • Jan 2019
    • 348

    #2
    Any help on this ?
    Cheers!
    Nishan.

    Comment

    • Maximus
      Senior Member
      • Nov 2018
      • 2731

      #3
      Hi there,

      > I want to show the week number of the created date on call

      There is no such Formula. You need either develop it or create a hook with the SQL query.
      This might be helpful:
      - https://dev.mysql.com/doc/refman/8.0...ion_weekofyear
      - https://dev.mysql.com/doc/refman/8.0...#function_week

      Comment

      • item
        Active Community Member
        • Mar 2017
        • 1476

        #4
        Hello,

        just create a formula (maybe exist out-of-box ). .. just in php return :


        http://week-number.net/programming/w...er-in-php.html

        or something like this :

        date("W", $yourdate)
        If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

        Comment

        • Nishan Perera
          Active Community Member
          • Jan 2019
          • 348

          #5
          Maximus item Thank you for the above support. will work on that.
          Cheers!
          Nishan.

          Comment

          Working...