Hello to all,
I can add 9 days to a date?
How should I do, I have to work with the hooks and what code should I enter?
Thank you very much.
Add days to a date
Re: Add days to a date
Hello,
no one can explain how to add days to a date, and what code I have to add in hooks?
example
12/10/2013 insert and in the field to obtain (+ 8 days) 20/10/2013
Thank you very much.
no one can explain how to add days to a date, and what code I have to add in hooks?
example
12/10/2013 insert and in the field to obtain (+ 8 days) 20/10/2013
Thank you very much.
Re: Add days to a date
Here is some generic code that you can adapt:
Code: Select all
/* before adding to date, you need to convert it to timestamp */
$date1_timestamp = strtotime($data['date1']);
/* then add 8 days (convert to seconds first) */
$date2_timestamp = $date1_timestamp + 8 * 24 * 60 * 60;
/* finally convert to date2 */
$data['date2'] = date('Y-m-d', $date2_timestamp);
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: Add days to a date
Hello Ahmad,
thank you very much.
I'll try and let you know.
thank you very much.
I'll try and let you know.
Re: Add days to a date
Thank you very much. This works great!