My goal is to have Butler fill custom field {{%Pmts Made} with the difference between {{%First Payment} and the current month. I've tried the syntax
when custom fields "First Payment" are completed, set custom field "Pmts Made" to "{date=1d}-{{%First Payment}"
but the field doesn't populate.
How can I accomplish this?
https://help.trello.com/article/1159-arithmetic-in-date-variables
my understanding is that you can adjust a CF date variable but you can subtract between two CF Date variables. However if you format dates as strings like ~YYYYMMDD you can do arithmetic on them like any other number CF but I does not handle cross month or year. There may be another format that can be used - I have to check.
Based on the documentation there appears to be a unix timestamp using ~X. Have not have tried it. If it works you might have to divide by a denominator to cover from secs to say days. Let me know if this work for you. Can learn from you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried with ({date=2d~X} - {date=1d~X})/86400 and I set this into a number CF and got 1 which is the expected results to show that indeed you can use the Unix timestamp format to do the maths.
Working with real dates need a bit more investigation
( {{%Date@UTC~X}} - {date=1d@UTC~X} )/86400
print on comment using
custom field date is {{%Date@UTC}} minus {date=1d@UTC} {time24}
gives you
custom field date is March 1, 2021 12:00 AM +08 minus March 1, 2021 +08 15:40
-0.6531944444444444 when multiply by 24 you get 15.67666 or 15 hrs and 40mins
So {date} it does take on an assumption of time based on current time
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.