Closed (fixed)
Project:
Datex
Version:
7.x-2.0-alpha3
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
5 Feb 2015 at 12:05 UTC
Updated:
25 Feb 2015 at 13:55 UTC
Jump to comment: Most recent
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
Comment #1
pegahmajma commentedOk 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.
Comment #2
pegahmajma commented