Support

Home Forums Event Espresso Premium Get Date and Time of Last Datetime?

Get Date and Time of Last Datetime?

Posted: January 12, 2016 at 10:17 am


Dallas REIG

January 12, 2016 at 10:17 am

Hello, I am using the below code to get the breakouts of the event datetime but the logic appears to only output the information on the first datetime of the event.

How do I get the start date of the first datetime and the end date of the last datetime of the event?

$datetime = espresso_event_date_obj($post->ID);
    $start_day = $datetime->start_date('l');
    $start_time = $datetime->start_time('g:i a');
    $start_date = $datetime->start_date('M j, Y');
    $end_time = $datetime->end_time('g:i a');
    $end_date = $datetime->end_date('F j, Y');

Thanks in advance.


Lorenzo Orlando Caum

  • Support Staff

January 12, 2016 at 12:14 pm

Hi Maceo,

Could you use these functions?

start_date_and_time
end_date_and_time

Also, if you need a date range, then these could be used:

espresso_event_date_range


Lorenzo

The support post ‘Get Date and Time of Last Datetime?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso