I actually have a custom date registered in UNIX Time in my database like this:
meta_key : custom_date meta_value : 1322697600
and the type of the meta key is a longtext
I would like to retrieve specific post according to the year of this custom_date
I would like something like this :
$args = array(
'paged' => $paged,
'posts_per_page' => 10,
'post_type' => 'custom',
'post_status' => 'publish',
'meta_query' => array(
array(
'key'=>'custom_date',
'value'=> '2010'
)
);
Anyone knows how to convert the custom date in Date in the query and get only the year of this date?