行云无鸣

2011-10-02

DB2下生成UNIX风格的timestamp

Filed under: 乱语 — 标签:, , — hellyguo @ 15:03

CAST (DAYS(CURRENT TIMESTAMP) - DAYS('1970-01-01') AS INTEGER) * 86400 + (MIDNIGHT_SECONDS(CURRENT TIMESTAMP – CURRENT TIMEZONE))

转自:dbForums

%d 博主赞过: