* Currently only supported in the commercial licenses
The function is almost identical to set_col_date() except it also has a time picker.
- Parameters:
- $col_name: column name
- $srcformat: source date format, eg. “Y-m-d”
- $newformat: new date form to be displayed, eg. “m/d/Y”
- $datepicker_format: datepicker format, eg. “m/d/yy”
- Description:
- Helper function to format the date using PHP date format options (http://php.net/manual/en/function.date.php). MySql always stores the date in either ‘YYYY-MM-DD’ or ‘YY-MM-DD’ format. However, we can still change the front-end date display format while conforming to its date standards.
- Remark:
- In most cases, you don’t need to call this method because phpGrid automatically formats the data with corresponding data type including the date.
- Only use this method in order to display date format that is different from default date format.
- To display time only, please use set_col_property instead.
- Example:
1 2 | // Display datetimepicker. Used when data is DATETIME type. $dg -> set_col_datetime("myDateTime"); |