• 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: Datetimepicker with Difference in 2 values

Datetimepicker with Difference in 2 values 9 years 2 weeks ago #34850

  • Isengo
  • Isengo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 2
Hey there,
I found a nice Tutorial (www.rsjoomla.com/support/documentation/r...formpro-calendardate) which is nice for calender, but I need it with the DTP - because I need the hours in between the two dates. Is there annother one I missed or can anybody help to get me startet? I guess I just have to replace the YUICalender?

I tried this in the PHP Code:

$difference1 = date_diff($_POST['form']['beginn'], $_POST['form']['ende']);
$_POST['form']['stunden'] = $difference1->format('%h');


But then my form won´t work for some reason. Can I use standard PHP functions in there? Testing on localhost worked fine...
$test1 = new DateTime('01.02.2011 11:00');
$date1 = date_format($test1, 'Y-m-d H:i:s');
 
$test2 = new DateTime('01.02.2011 17:00');
$date2 = date_format($test2, 'Y-m-d H:i:s');
echo $date1;
echo $date2;
 
 $difference1 = date_diff($test1, $test2);
$test = $difference1->format('%h');
 
echo $test;
Last Edit: 9 years 2 weeks ago by Isengo.
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!