Answers for "mysql timestamp format"

SQL
4

mysql timestamp to date

-- Use the FROM_UNIXTIME() function in MySQL
select from_unixtime(timestamp) from my_tbl;
Posted by: Guest on October-14-2020
1

format time mysql

-- use DATE_FORMAT with %H %i
-- SELECT DATE_FORMAT(MemberBookFacility.time, '%H:%i')
"45": "09:00",
"24": "10:00",
"42": "11:00",
"48": "12:00",

-- ONcakephp must use below format
$this->virtualFields['time'] = "DATE_FORMAT(MemberBookFacility.time, '%H:%i')";	// using this for use concat
	
		return $this->find('list', array(
          'conditions' => $conditions,
          'fields' => array(
            'MemberBookFacility.id', 
            'time',
          ),
          'order' => array(
            'MemberBookFacility.time ASC',
          ),
        ));
Posted by: Guest on October-27-2020
0

mysql timestamp format

INSERT INTO ... VALUES ('YYYY-MM-DD HH:MM:SS');
Posted by: Guest on October-29-2020

Code answers related to "mysql timestamp format"

Code answers related to "SQL"

Browse Popular Code Answers by Language