Support

Home Forums Event Espresso Premium EE4 Events Grid View – Hover Date and Time – How To Change

EE4 Events Grid View – Hover Date and Time – How To Change

Posted: December 22, 2016 at 2:14 pm

Viewing 3 reply threads


Dave Renshaw

December 22, 2016 at 2:14 pm

Does anyone know the syntax to output date only (without time)?
EE4 Events Grid View code snippet I’m looking at:

$startdate = date_i18n( $date_format, strtotime( $datetime->start_date_and_time(‘Y-m-d’, ‘H:i:s’) ) );

I just want to output the date – no time


Josh

  • Support Staff

December 22, 2016 at 2:25 pm

Instead of using the start_date_and_time() method there, you can use the
start_date() method.


Dave Renshaw

December 22, 2016 at 3:32 pm

That helped Josh, thanks.

Here’s what worked for me:

Original

$startdate = date_i18n( $date_format . ‘ ‘ . $time_format, strtotime( $datetime->start_date_and_time(‘Y-m-d’, ‘H:i:s’) ) )

New

$startdate = date_i18n( $date_format, strtotime( $datetime->start_date(‘Y-m-d’) ) )


Josh

  • Support Staff

December 22, 2016 at 4:30 pm

:+1:

Viewing 3 reply threads

The support post ‘EE4 Events Grid View – Hover Date and Time – How To Change’ 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