Casting a custom attribute as a date | Community
Skip to main content

Casting a custom attribute as a date

  • September 28, 2021
  • 3 replies
  • 0 views

Hi everyone,

I'm hoping this is a obvious/simple solution.

I am trying to do some rough forecasting which looks at a date 90 days after the ticket is solved. I'd like the attribute to behave like a date attribute where I can apply ranges or ideally even split into weeks and months, however, I know the latter requires extra work.

Here is my code so far and I'm stumped as to why it's not appearing as a date.

DATE(DATE_FORMAT(DATE_ADD([Ticket solved - Date], "day", 90), "yyyy-MM-dd"))

3 replies

Erin21
  • September 28, 2021

Hi @Chris Gould, the code you wrote above is working as expected for me in my test instance (for example, I see 2021-09-14). One quick thing to double-check is that you've created this as a standard calculated attribute—if you've accidentally created it as a standard calculated metric, it'll return as blank. :) 


  • Author
  • September 29, 2021

Hi @ErinS O'Callaghan,Yes the formula definitely works, however, I need to function as a date. Not just a normal attribute field.

So I would like to apply ranges to it like you might with ticket created-date and ticket solved - date.

For example: show me the "New attribute" for This month


Maryann11
  • April 7, 2023

My understanding is that it's not possible to apply custom ranges to custom attributes based on all my research. I am still looking for a workaround so I don't have to manually update the filters if I am interested in looking at my custom date attribute for just last week as an example.