877-GRID-666 24/7 online support 604, Tower A, New Trade Plaza, N.T., Hong Kong


  • Parameters:
    • $col_name: column name
    • $srcformat: source date format, eg. “Y-m-d”
    • $newformat: new date form to be displayed, eg. “n/j/Y”
    • $datepicker_format: datepicker format, eg. “m/dd/yy”
  • Description:
  • Remark:
    • In most cases, you don’t need to call this method because phpGrid automatically formats the data with corresponding data type including 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:
// srcFormat: MySql date format is "Y-m-d"
// newFormat: Display date format is "n/j/Y"
// datepicker: Datepicker date format is "yy-mm-dd"
$dg -> set_col_date("orderDate", "Y-m-d", "n/j/Y", "yy-mm-dd");