Stevebenson223
Member
Hi all
Grateful for any assistance for this struggling but enthusiastic newbie.
I am trying to create a membership app. I have an element "season start date" (jdate plugin) which the user completes manually. Then I have an "season end date" element to calculate 364 days ahead. I have achieved this using a calc plugin and the code:
$season_end_date = date('jS F, Y', strtotime('{maintenance___season_start_date_raw}' . " +1 year" . " -1 day"));
return $season_end_date;
This works ok but I then need to use this element in other lists as a date and the calc element is storing this as text. I'm assuming this is because I'm using a string variable in the calculation but I've tried other ways and can't get it to work.
I've also tried a "season end date" element as a jdate plugin using a similar calculation but without using a string variable. The best result I can get is the date displaying as 1st January 1970. Clearly I'm using the wrong code but my php skills are severely limited and I can't work out what I should be doing.
Any ideas please?
Thanks,
Steve
Grateful for any assistance for this struggling but enthusiastic newbie.
I am trying to create a membership app. I have an element "season start date" (jdate plugin) which the user completes manually. Then I have an "season end date" element to calculate 364 days ahead. I have achieved this using a calc plugin and the code:
$season_end_date = date('jS F, Y', strtotime('{maintenance___season_start_date_raw}' . " +1 year" . " -1 day"));
return $season_end_date;
This works ok but I then need to use this element in other lists as a date and the calc element is storing this as text. I'm assuming this is because I'm using a string variable in the calculation but I've tried other ways and can't get it to work.
I've also tried a "season end date" element as a jdate plugin using a similar calculation but without using a string variable. The best result I can get is the date displaying as 1st January 1970. Clearly I'm using the wrong code but my php skills are severely limited and I can't work out what I should be doing.
Any ideas please?
Thanks,
Steve