• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: How I add 30 days in a date in the Default field

How I add 30 days in a date in the Default field 12 years 2 months ago #21834

  • gracinha
  • gracinha's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello!

Please, how I add 30 days in a date in the Default field?

To view a current date I add the next code in the Default fied:

//<code>
return date('d M Y');
//</code>

And to average more 30 days, how I do?

Thank you!
The administrator has disabled public write access.

How I add 30 days in a date in the Default field 12 years 2 months ago #21859

  • octavian
  • octavian's Avatar
  • NOW ONLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
You can use strtotime:
//<code>
return date('d M Y', strtotime('+30 days'));
//</code>
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

How I add 30 days in a date in the Default field 11 years 5 months ago #25651

Hi!
This code don't work now, it's :
//<code>
return date('m/d/Y', strtotime('+30 days'));
//</code>

and for 60 days before :
//<code>
return date('m/d/Y', strtotime('-60 days'));
//</code>

Bye
Last Edit: 11 years 5 months ago by contact332.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!