none
The equivalent of Excel's TEXT formula in Project

    Question

  • Hi folks,

    I need your help with a formula.

    In brief, I need a formula to be set up as an enterprise project-level of type "text" field so that my month in my string is always formatted as 2-digits.

    I.e., if the "month(date)" is between month 1 (January) and month 9 (September), I want a leading "0" (zero) in front of that month.  E.g., "-07-" versus "-7-".

    In Excel, this formula works perfectly:

    TEXT(now(),"00")

    But the formula above is not accepted in Project (On-line).  I get an error message: "custom field could not be saved".  "TEXT" does not seem to be a formula that can be used in Project.

    Does anyone know of a more efficient formula than this to accomplish what I need in Project (OnLine)?

    IIF(MONTH(now())>9, MONTH(now()),"0"&MONTH(now()))

    Thanks in advance,


    \Spiro Theopoulos, Montreal, QC (Canada)





    Thursday, May 2, 2019 8:19 PM

All replies

  • Pls try Format( Date(), "mm" )
    Thursday, May 2, 2019 9:32 PM
  • Unfortunately the formula you suggested does not work in an enterprise-level custom field.

    In Project Online I get the error message: "custom field could not be saved..."


    \Spiro Theopoulos, Montreal, QC (Canada)


    • Edited by Spiro Theopoulos Thursday, May 2, 2019 10:11 PM changed sentence structure
    Thursday, May 2, 2019 10:09 PM
  • Sorry, I forgot to include the parentheses in the Date function. Pls try it now. 
    Thursday, May 2, 2019 10:22 PM
  • Unfortunately the formula you suggested does not work in an enterprise-level custom field.

    In Project Online I get the error message: "custom field could not be saved..."


    \Spiro Theopoulos, Montreal, QC (Canada)


    Sorry, if the Format function does not work, no further comments.  
    Thursday, May 2, 2019 10:33 PM
  • Your formula does not work at the "enterprise" level.

    I tried the following example which only works in the Microsoft Project stand-alone client (i.e., as a local custom field only), i.e.,:

    Format([START], "mm")

    Although this exact formula example works in a local custom field, the exact same formula does not work as an "enterprise" custom field formula.  I continue to get the error, "custom field could not be saved..." when I try this exact  formula.


    \Spiro Theopoulos, Montreal, QC (Canada)

    Thursday, May 2, 2019 10:40 PM