I would like to add one or more fields that are calculated at runtime to my “Load Table” result. In SQL I would have put this in my SELECT statement. (SELECT *, DATEDIFF(today, createdDate) as age)
I have tried everything that came to my mind to achieve this and I haven’t found a solution here in this Support Board.
Fields that are calculated at runtime can be added using dynamic properties.
Unfortunately DATEDIFF function is not supported at the current moment by Data Service grammar. I have created an internal ticket BKNDLSS-28659 to add this function. As a temporal bypass you can use next expression for property now() - createdDate. Result of this expression will be amount in seconds between these two dates. Sorry for inconvenience.
I do not get the right amount seconds. If I calculate the number of days based in this number the result is completely off. That makes it difficult to test. Any idea why this may be the case?
now(): 1655650706000
createdDate: 1648764000000
now()-createdDate as age: 287925826 (coming from load table)
I just tried to reproduce this issue, but everything works correctly for me.
Could you please repeat this test and add screenshots of the logic and results in the console?