对码当歌,猿生几何?

hql中from_unixtime函数的format参数取值穷举

hql中from_unixtime函数的format参数取值穷举

字符含义类型
示例
Gera designatorTextAD
yyearNumber2009
Mmonth in yearText & NumberJuly & 07
dday in monthNumber10
hhour in am/pm (1-12)Number12
Hhour in day (0-23)Number0
mminute in hourNumber30
ssecond in minuteNumber55
SmillisecondNumber978
Eday in weekTextTuesday
Dday in yearNumber189
Fday of week in monthNumber2 (2nd Wed in July)
wweek in yearNumber27
Wweek in monthNumber2
aam/pm markerTextPM
khour in day (1-24)Number24
Khour in am/pm (0-11)Number0
ztime zoneTextPacific Standard Time
'escape for textDelimiter(none)
'single quoteLiteral'

Hql中表示日期及时间需要这样的format —— yyyy-MM-dd HH:mm:ss