SOLVED: Calculate a date 5 day in the future

More
1 month 2 weeks ago #201995 by blocka
I need to save a date that is the is a sum of the current date plus 5 days. This will allow me to display a deadline to the participant like:

Today's day is 2020-06-29: You need to mail in your sample by 2020-07-04.

That is, I want to calculate today's date + 5 days.

Can anyone suggest how this can be done?

Please Log in to join the conversation.

LimeSurvey Partners
More
1 month 2 weeks ago #201996 by blocka
Figured it out, for others:

{( date('d F Y',((strtotime(date('Y-m-d')) + (60 * 60 * 24 * 5) ))) )}

Where the 60 * 60 * 24 is number of seconds in a day, and 5 is the number of days.
The following user(s) said Thank You: holch

Please Log in to join the conversation.

More
1 month 2 weeks ago #202017 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now