I'm using a formula in a workbook to show the numb...
# suiteanalytics
z
I'm using a formula in a workbook to show the number of days since today. Is there a function I can use to get today's date and another function to subtract a date field value from another? Would I better off using conversion like TO_NUMBER?
z
SYSDATE is the typical function used to get today's date
z
Unfortunately I don't think SYSDATE is available here:
It looks like I can use CURRENT_DATE for getting today's date, I must have missed it while searching. I still can't find a good way to subtract the two dates via formula.
Apparently DATE is not supported either, and CURERNT_DATE returns a datetime instead of a date value. How do I convert the value outside of using some crazy TO_CHAR convert + parsing?
I found out there is a specific cast that is allowed for converting Datetime into Date - CAST_TO_DATE. CAST is not available but this helps haha.
Okay I think I got it: ROUND(CAST_TO_DATE((CURRENT_DATE)) -{custentity_last_tran_date}) I want to convert this to an integer output though, looking into it.
g
If only workbooks was literally just the ability to pivot a saved search.
❤️ 1
z
I gave up on the float -> int convert and I'm just going to convert the value into a string and substring before the '.'. I'll look into it more later.