public static function unixtime2Sql($dateNum)
	{
		// 31/01/2016 20:20:00 --> 2016-01-31 00:00
		if ($dateNum == null) {
			return DaoOne::$dateEpoch;
		}
		try {
			$date2 = new DateTime(date("Y-m-d H:i:s.u", $dateNum));
		} catch (Exception $e) {
			return DaoOne::$dateEpoch;
		}
		return $date2->format('Y-m-d H:i:s.u');
	}
public static function unixtime2Sql($dateNum)
	{
		// 31/01/2016 20:20:00 --> 2016-01-31 00:00
		if ($dateNum == null) {
			return DaoOne::$dateEpoch;
		}
		try {
			$date2 = new DateTime(date("Y-m-d H:i:s.u", $dateNum));
		} catch (Exception $e) {
			return DaoOne::$dateEpoch;
		}
		return $date2->format('Y-m-d H:i:s.u');
	}
public static function unixtime2Sql ( $ dateNum ) { // 31/01/2016 20:20:00 --> 2016-01-31 00:00 if ( $ dateNum == null ) { return DaoOne :: $ dateEpoch ; } try { $ date2 = new DateTime ( date ( "Y-m-d H:i:s.u" , $ dateNum ) ) ; } catch ( Exception $ e ) { return DaoOne :: $ dateEpoch ; } return $ date2 -> format ( 'Y-m-d H:i:s.u' ) ; }
Convert date from unix -> mysql
@param integer $dateNum
@return string
Convert date from unix - > mysql