Radiobutton, change of state after 12 hours, 24 hours and.....

giusebos

Member
Hi everyone,
I have a table with the datetime field that records the time when the record was created

in the table I have 4 choices (radiobutton):
24h,
48h,
7 days
15days

I would like to have a field, where at the expiration of 50% of the time there is written "is about to expire"

I would like to have a field, where at the end of 100% of time there is written "expired"

I hope in your help
happy 2019
 
unfortunately I do not know anything about PHP and I do not know how to start.
I thought I would solve with the cal plug-in, adding the minutes to the given field,
when the difference between input time and current time is greater than 720 minutes (12h) for example:

27-12-2018 15:03 + 720minutes

I was thinking of inserting a field that would dynamically fill up when conditions occur
 
Ok, to start to understand something, I entered this code:

PHP:
$nowdate = strtotime("{table___element}");
$thendate = strtotime("today");
$datediff = ($thendate - $nowdate);
$diff = round($datediff / 86400);
return $diff;

I get strange numbers that I do not understand
I would like to have this result:
1 day, 3 hours and 10 minutes

the difference in dates I need to generate a visual all-time in 2 times
in this regard I want to attach an explanatory image
I should add to this mechanism sending emails 50% of the time and 100% of the time

I also add that I would like to pay for the help offered, I opened a request for paid help, but I have not yet received a reply.

thank youistruzioni-1.jpg
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top