MySQL - 翻译 - 5.1Reference Manual参考手册 - 11.6.Date and Time Functions日期和时间函数 - FROM_UNIXTIME将UNIX时间戳格式化为日期
FROM_UNIXTIME(unix_timestamp),FROM_UNIXTIME(unix_timestamp,format) Returns a representation of theunix_timestamp argument as a valuein 'YYYY-MM-DD HH:MM:SS' orYYYYMMDDHHMMSS.uuuuuu format, depending onwhether the function is used in a string or numeric context.The value is expressed in the current time zone.unix_timestamp is an internaltimestamp value such as is produced by theUNIX_TIMESTAMP() function.
返回'YYYY-MM-DDHH:MM:SS'或YYYYMMDDHHMMSS.uuuuuu 格式值的unix_timestamp参数表示,具体格式取决于该函数是否用在字符串中或是数字语境中。该值以当前时间区域中表示,unix_timestamp 是一个类似于使用UNIX_TIMESTAMP()函数生成的内部时间戳值。
If format is given, the result isformatted according to the formatstring, which is used the same way as listed in the entry forthe DATE_FORMAT() function.
若format已经给出,则结果的格式是根据format字符串而定。 format可以包含同DATE_FORMAT() 函数输入项列表中相同的说明符。
Note: If you useUNIX_TIMESTAMP() andFROM_UNIXTIME() to convertbetween TIMESTAMP values andUnix timestamp values, the conversion is lossy because themapping is not one-to-one in both directions. For details, seethe description of theUNIX_TIMESTAMP() function.
注意:如果使用UNIX_TIMESTAMP()和FROM_UNIXTIME()在TIMESTAMP值和Unix时间戳值之间转换,由于双向不是一对一映射,因此转换是有损的。细节请参考UNIX_TIMESTAMP()函数。
[MySQL- 5.1Reference Manual参考手册 - 11 Functions and Operators函数和操作符 -11.6.Date and Time Functions日期和时间函数 - FROM_UNIXTIME将UNIX时间戳格式化为日期 - 文档]
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_from-unixtime
http://dev.mysql.com/doc/refman/5.1/zh/functions.html#date-and-time-functions [MySQL - 官方网站]
http://www.mysql.com/