IBM Support

Changing Unix time to readable Timestamp in Db2

Question & Answer


Question

How can I change user login time in readable format from a Db2 table which is capturing time in Unix Format.

$ db2 "Select * from test.AMSMSUSERINFOTABLE"

USERNAME LASTLOGIN
---------------------------------------- --------------------
AA 1322566004495
BB 1321946851420
2 record(s) selected.

LASTLOGIN is not readable due to UNIX time(Epoch) Format.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"ARM Category":[{"code":"a8m500000008PkiAAE","label":"Administrative Tools"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
30 April 2025

UID

ibm16258219