Forum Discussion

joshua1990's avatar
joshua1990
Post Prodigy
6 years ago
Solved

Custom Colum for converting numbers to time for Query Folding

Hello everybody!   I am currently trying to optimize my query using Query Folding. As I understand it, a custom column can also be query folding. I would like to implement this for the following: ...
  • QuinnP's avatar
    6 years ago

    Hi joshua1990 Josh,

     

    I was able to implement this by adding a custom column with the definition below, then replacing the value "24:00:00" with "23:59:59".  Note that the if statements are there to ensure that we have two zeroes "00" when we have a round number of minutes or seconds instead of a single zero.

    Number.ToText(Number.RoundDown([END]/10000))&":"&(if Number.ToText(Number.Mod([END],10000)/100) = "0" then "00" else Number.ToText(Number.Mod([END],10000)/100) )&":"&(if Number.ToText(Number.Mod([END],100)) = "0" then "00" else Number.ToText(Number.Mod([END],100)) )

     

    Cheers,

     

    Quinn