Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a field called [Internal Value from] with dates as text like.. 20210930
I need to convert that to a date format in the script so I can calculate number of months from today. This is the formula I'm trying to use, but it's giving me a number that appears to be the difference in the two values as a plain number, not a date.
If([Characteristic Name Desc]='Ar Contract Expiration Date',
(((Date([Internal Value from])-Date(Today()))/30))) AS [Ar Exp Months]
Any thoughts?
Thanks!!
Hi,
You need interpreter functions like Date#(). Else the function can't reed your date stamp.
Try this:
If([Characteristic Name Desc]='Ar Contract Expiration Date',
(
Date( Today() ) - Date( Date#( [Internal Value from], 'YYYYMMDD' ) )
)
/ 30
)
Jordy
Climber
Hi,
You need interpreter functions like Date#(). Else the function can't reed your date stamp.
Try this:
If([Characteristic Name Desc]='Ar Contract Expiration Date',
(
Date( Today() ) - Date( Date#( [Internal Value from], 'YYYYMMDD' ) )
)
/ 30
)
Jordy
Climber
Hi,
Yes that 5 digit number is the numeric value of date. You can check this for instance in Excel where if you put 44200, you will get a date if you change the format.
And yes, your script will work in the back-end!
Jordy
Climber