I don’t know if it’s easier or more complex, but the calculation I need to do is a combination of values from a couple other columns. Basically, I’m trying to get the midpoint between two date fields. This is what I tried:
LocalDate objects cannot be combined with Double values (the 15 that you’re trying to subtract) using simple arithmetic operations.
In the same vein, the periodOf functions return a value of type Period which has a very specific format. These also cannot simply be added to or subtracted from LocalDate values (such as the Dates you’re trying to manipulate).
I think you should use the plusTemporal function in line 3. It takes in a LocalDate value and a Duration / Period value and outputs a LocalDate value: