Support

Account

Home Forums General Issues Data – events between dates ?

Solving

Data – events between dates ?

  • Hi.
    I have same problem with date and display events.

    ex. I have event where fields are:
    start_event = 20180701
    end_event = 20180901

    and I have query like this:

               $today = '20180801';
    
                $args = array (
                    'posts_per_page' => -1,
                    'post_type' => 'events',
                    'meta_query' => array(
                        array(
                            'key' => 'start_event',
                            'value' => $today,
                            'compare' => '='
                        ),
                    ),    		
                );
    

    This query display events only with start_event=20180801.

    But how display events where $today is between
    start_event = 20180701
    end_event = 20180901
    ?

    Somebody can help me?
    Thanks.

  • ex 2.

    Event 1
    start = 2018 07 01
    end = 2018 09 01

    Event 2
    start = 2018 08 01
    end = 2018 08 01

    Today is 2018 08 01

    How I can display this 2 evetns ?

  • Next ex. (maybe more visual)…

    timelapse_Obszar_roboczy_1

    Today is: 25.07.
    How I can display all 3 events? Not only event2.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Data – events between dates ?’ is closed to new replies.