Syntax for days until a future date function in Analytics dataset

Need to create a function in an Suite Analytics dataset that will calculate the days between TODAY and a future date for a dashboard inventory availability tracker. The future date is a transaction field. Simple functions like {Current_Date}-{Future_Date} dont work & looking for options took me on a circular journey through CASE statements, CAST statements where the data types seemed to clash & the function wouldnt verify.

Answer:

FLOOR(CAST_TO_DATE({custentity39})-CAST_TO_DATE(CURRENT_DATE))

image.png

image.png

Assuming your field is a DATE field.

The final result is then rounded. 

Leave a comment

Your email address will not be published. Required fields are marked *