1-- Use the FROM_UNIXTIME() function in MySQL
2select from_unixtime(timestamp) from my_tbl;
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 ));