Forum Discussion

ThomasRingkamp's avatar
ThomasRingkamp
Qrew Member
5 years ago

How to extract Year from a Date Calculated Field

I have a Date Calculated Field called OSP Ready Date whose Formula is this: If([Construction Complete?]=true, Max([Coax Construction Task Completed Date],[Fiber Construction Task Completed Date],[Node Install Task Completed Date]),null).

I would like to extract the Year from this calculated date. Can this be done?

When I try: Year([OSP Ready Date]), I get: "expecting date but found number".

When I try: When I try: Year(ToDate([OSP Ready Date])), I get: "expecting datetime/workdate but found date".

------------------------------
Thomas Ringkamp
------------------------------
  • It appears that your field for Year is a date field type. Change it to a formula numeric field type.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • ThomasRingkamp's avatar
      ThomasRingkamp
      Qrew Member
      Would the field still show as as Date in the Table or as as Number? I need it to show a Date

      ------------------------------
      Thomas Ringkamp
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Sorry, but I don't understand the question.  Can you give an example with real date.  For example today is March 1st, 2020 and the year is the number 2021.  2021 is not a date, it's a number.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------