Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Adding Dates

Avatar

Former Community Member
Is there a way to add calculated dates in a Date/Time field based on an entry in another?



I.E. dtGoodThrough = dtRequestedDate+(7*13)



In essence adding 13 weeks to an initial date selection?



Thanks,



Smitty
6 Replies

Avatar

Former Community Member
Yes ...you have to convert the date to a number (# of milliseconds from the epoch) and then add the allotted number of milliseconds then convert back.



If you post your email address I will send you a sample that adds 1 year to the date.

Avatar

Former Community Member
Tried sending it and your email address was not found so it couldnot be delivered. Is there a typo in the address?

Avatar

Former Community Member
Could you please send me the same sample to gerardo2475@yahoo.com

Paul?

Thanks in advance.