NetIQ AppManager 7.0.x
What format are dates and times stored in the Repository?
What utility can I use to translate date and time stamps into readable format?
Dates and times in the AppManager Repository (for example, the Time column of the Data table) are stored as integers using the Universal Coordinated Time (UTC) format. These dates and times are also used in AppManager log files. The UTC format is loosely defined as the current date and time of day in Greenwich, England.
NetIQ provides a utility called prttime to translate date and time stamps into a readable format. You can find the prttime.exe program in the Extras folder in the AppManager installation kit.
To translate a specific date and time in UTC format to a readable date and time format for AppManager log files:
- Run the utility from the CD, or copy the prttime.exe file to a directory in the system path and launch a command prompt to execute the utility.
- Copy the date and time in UTC format from an AppManager log file (for example, 1023460132).
- Paste the date and time in UTC format in the command prompt using the Paste menu option, or type the date and time in UTC format at the following line:
Please enter a time ==>
- Press Enter. This will return the UTC date and time (for example,1023460132)in a readable format similar to the following:
Fri Jun 07 07:28:52 2002
To convert dates and times stored in UTC format on the AppManager Repository to a readable format:
- Open SQL Server Query Analyzer.
- Select the Repository (QDB).
- Use this SQL statement as a guide to build other SQL queries to convert the dates and times stored in UTC format into a readable format. Using this exact SQL query will return all dates and times for all data in the Data table in readable format.
Note: If the name of the AppManager Repository is renamed from the default (QDB), replace QDB with the appropriate name.
DECLARE @t int
EXEC master.dbo.xp_regread 'HKEY_LOCAL_MACHINE',
@param = @t OUT
SELECT @t = @t 60 / convert to seconds */
SELECT dateadd(second, Time-(@t), '1/1/70 0:0:0')
Run the SQL query by pressing F5 or clicking the green arrow.
This SQL query returns Event information adjusted to Eastern Standard Time (EST). The JobID will need to be adjusted accordingly.
Convert(char(50),EventDetail.AgentMsgShort) "Short Agent Message",
Convert(char(50),EventDetail.AgentMsgLong) "Long Agent Message", RealTime =
FROM Event, EventDetail
WHERE Event.EventID=EventDetail.EventID AND Event.JobID =61999
ORDER BY Event.MachineName, EventDetail.FirstOccurTime
WARNING: The above SQL queries directly accesses your database and update/delete data. If the queries are performed incorrectly it can cause irreparable harm to the database and may result in loss of data. If you are unfamiliar with SQL or how to run a SQL query please contact NetIQ Technical Support directly.
You can use the following SQL Query to input a specific calendar date to have AppManager return UTC time format:
where '1/1/1970' should the date you wish to convert.
This query returns the following result: