hi
I need to change back datex format to miladi to select record from database.
in views I have Global php and I use these codes to get date that user selected:
$view = views_get_current_view();
$date_min = $view->exposed_input['field_date_value']['min']['datex_edit_field_date_value_min'];
and this like: 1393-11-30
but I need it in miladi to check in data base.
Should I use "datex_handler_field_date"? But how?
Any help will appreciate.

Comments

pegahmajma’s picture

Ok then I solved it.Hooooraiiii!
I change my direction to get the views original query and get the values from there.because in the query we have correct date.
I put it here to make some one happy!

first do sth like:

$view = views_get_current_view();
$query = $view->build_info['query'];
return($query->arguments());

to know your needed value.
in my case:

$view = views_get_current_view();
$query = $view->build_info['query'];
foreach($query->arguments() as $key => $value){
if($key == ':field_data_field_date_field_date_value2'){
$datemin = $value;
}
if($key == ':field_data_field_date_field_date_value3'){
$datemax = $value;
}
}
return print('min'.$datemin.'///max:'.$datemax);

Ofcourse you know do these line in Global php field.Now I could write my code to use date.

pegahmajma’s picture

Title: how change datex format to miladi in views? » how change datex format to miladi in views?
Priority: Major » Normal
Status: Active » Closed (fixed)