Forum Discussion

KurtKelsey's avatar
KurtKelsey
Qrew Cadet
8 years ago

How can I calculate the duration of a project to display in a table? I have a field ""Date Created"".

5 Replies

  • Not only do I need to see from "Date Created" to "Date Completed", but would also like to see "Date Created" to Todays Date if not completed.
  • Try this as a formula numeric field called [Project Duration Days]

    var date EndDate = IF(not IsNull([Date Completed]),[Date Completed],Today());

    ToDays($EndDate - ToDate([Date Created]))

    The built in field for [Date Created] is actually a date/time field type so that is why it needs to be converted to a date with the ToDate function.
    • KurtKelsey's avatar
      KurtKelsey
      Qrew Cadet
      Another question if I may.
      In a message from quickbase, I want to put a link to the original message in the email.
      I know that the link is created using:  %recLink%

      However, is it possible to put this in a href tag?
      <a href="%recLink%">REPLY to this message</a>

      It is not displaying properly in my test
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      I suggest that you build you own link.

      Here is an example.

      I always do them this way as that way the syntax is always correct the first time.

      var text Words = [Account Name];
      var text URL = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];

      "<a href="  & $URL & ">" & $Words & "</a>