Need help updating current logic for capturing "Year".

  • 0
  • 2
  • Question
  • Updated 10 months ago
  • Answered

Need help updating current logic to account for 2018 projects is there an easier way to capture year no matter what the month or day is?

[Program approved] is a formula – text field type.

[Permanently Rejected] is a Date field type.

Current logic:

If(Date(2016,12,31)>=[Program approved] or Date(2016,12,31)>=[Permanently Rejected],"2016", "2017")
Photo of Stephen Anguiano

Stephen Anguiano

  • 394 Points 250 badge 2x thumb

Posted 10 months ago

  • 0
  • 2
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
The function

Year([my date]) will return a numeric value like 2018
(Edited)
Photo of Stephen Anguiano

Stephen Anguiano

  • 394 Points 250 badge 2x thumb
So I can write the logic like so to get year:


If(Year([Program approved]) or Year([Permanently Rejected]))
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
well that exact formula would not work as a text formula field type

But this would

IF(
not IsNull([Program approved]), ToText(Year([Program approved])),
not IsNull([Program Rejected]), ToText(Year([Program Rejected]))
)

Photo of Stephen Anguiano

Stephen Anguiano

  • 394 Points 250 badge 2x thumb
Thank you that worked great.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
Thx for letting me know.!