Display only start time and end time?

Home Forums Calendar Products Events Calendar PRO Display only start time and end time?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12112
    Laura
    Member

    Is there anyway to simply display the actual start time and end time? AKA 5:00 pm – 9:00 pm ?

    It seems like the only date functions available for start/end date can only display the time if it includes the date in front of it.

    Any help appreciated.

    #12121
    Joe
    Member

    Take a look at the PHP date function: http://php.net/manual/en/function.date.php
    Then you can call tribe_get_start_date and tribe_get_end_date using custom formats. To produce the format you listed (12 hour times with lowercase am/pm), you could use the PHP date syntax ‘g:i a’ — for example:

    #12122
    Joe
    Member

    Dangit, I thought wrapping it in [code][/code] tags would work. Here, replace the [ ]s with s.
    [?php echo tribe_get_start_date( null, false, 'g:i a' ); ?] – [?php echo tribe_get_end_date( null, false, 'g:i a' ); ?]

    #12129
    Laura
    Member

    Perfect! Didn’t think to pass in the null value there. Thanks again.

    #12153
    Rob
    Member

    Thanks for the help, Joe.

    Laura: let us know if you need anything else here.

    #974886
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Display only start time and end time?’ is closed to new replies.