Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Show From and Show Until Past Now

$meta_query = array(
	'relation' => 'AND',
	array(
		'key'     => 'show_from',
		'value'   => 'now',
		'compare' => '>=',
		'type'    => 'DATETIME',
	),
	array(
		'key'     => 'show_until',
		'value'   => 'now',
		'compare' => '>=',
		'type'    => 'DATETIME',
	),
);