1DATE_FORMAT(date, format)
2-- E.g.
3SELECT DATE_FORMAT(dateField, '%m/%d/%Y') FROM TableName;
4-- See https://www.mysqltutorial.org/mysql-date_format/ for available formats
1-- use DATE_FORMAT with %H %i
2-- SELECT DATE_FORMAT(MemberBookFacility.time, '%H:%i')
3"45": "09:00",
4"24": "10:00",
5"42": "11:00",
6"48": "12:00",
7
8-- ONcakephp must use below format
9$this->virtualFields['time'] = "DATE_FORMAT(MemberBookFacility.time, '%H:%i')"; // using this for use concat
10
11 return $this->find('list', array(
12 'conditions' => $conditions,
13 'fields' => array(
14 'MemberBookFacility.id',
15 'time',
16 ),
17 'order' => array(
18 'MemberBookFacility.time ASC',
19 ),
20 ));