Date Calculations - @Calendar1 + X days = @Calendar2
Does anyone know if this is possible or have a javascript that works? Can you use a calculation to set a date on a calendar in the app?
this is what I have so far
d = new Date( My_Date );
d.setDate(d.getDate() + 14);
d.getTime();
moment(d).format ('l')
this = 6,182,014 (if it was formatted to mm/dd/yyyy that would be correct)
Any help beyond this point would be greatly appreciated.
-
Assuming My_Date is defined in another field as '6/09/2014'
Hope this helps...
d = new Date( @My_Date ); d.setDate(d.getDate() + 14);moment(d).format ('l')
returns
6/23/2014
However the calculation will not take into account your time zone. More accurately it will not take into account your location time zone offset from the Podio server location time zone.
My location offset in Denver is 6 hours.
For Example:
d = new Date( My_Date ); d.setDate(d.getDate() + 14);moment(d).format ('l');moment(d).subtract('hours', 6).format('l')
returns June 23 2014 1:30 PM adjusted for my offset from the Podio server.
Caution: time zones are tricky in calculationsBob
-
End Date!!! There are about 5 of us looking for end date. The current answer is: "it is not available". This is from a month ago: https://help.podio.com/hc/communities/public/questions/201836358-Count-days-in-date-fields. So I sent an email straight to the big wigs. No satisfactory response so far... Not the fastest car on the track but any work around would make me happy.
Please sign in to leave a comment.
Comments
4 comments