Please Add the Day Function to the Pre-Defined List on Calculated Fields

Jason Kaczmarek shared this idea 12 months ago
Idea Logged

You currently have year, month, week, and hour in the list of pre-defined functions for a calculated field. I really could have used the day function. I'm trying to come up with a way to calculate age, based on a date parameter. I can do it in parts, but without the day, I'm out of luck. So please consider adding it in a future build.

Thank you,

Jason

Comments (4)

photo
1

hey Jason,

I hope you are well and sorry for the delay on this!

The day function is dependant on the type of database your view is based on as seen here

I'll be happy to log this to the devs if you could provide some more information about the data view type and the kind of report you are trying to build as this will allow me to be more specific when explaining to the devs.

I look forward to your response

Thanks & Best Wishes,

Lesley

photo
1

Lesley-Anne,

A couple of times now I've wanted to do a calculation based on a date parameter. My latest project was to calculate length of employment based on the date selected. However, since parameters are not included in the SQL statement, we don't have access to them unless we use built in functions. It's a bit of a hack, but if the day function was available, I feel I would have been able to get the result I needed. If the day function is not commonly available in most DB's, I see the point of not including it. Maybe a better solution would be to add the ability to include a parameter (i.e. variable) in the SQL statement. Then we could not only put it in as a field, but could reference it in calculated fields. Ultimately I resorted to creating a SQL procedure for this report; however, that's not ideal as I don't have other employees in my office that have the SQL knowledge I do. I want to keep those things to a minimum.

Here is a link to a similar post I made last year.

Jason

photo
1

Hi Jason,

Looks like this has been an on going limitation for you for a while. it would make sense for a day function to be available or at least accessible and make things smoother running without having to complicate things. ill suggest both ideas to the devs for you!

Best Wishes,

Lesley

photo
1

I've logged them as an enhancement to the devs, Jason. I'll keep an eye on the progress of it and as soon as i get an update, ill update you too!

Hope thats ok :)

Best Wishes,

Lesley