How to add the Local Time in SCCM 2012 Reports

Hi All,

Unfortunately, ConfigMgr 2012 sometimes uses UTC times and sometimes local times in reports. There is no global setting to Use always local (or UTC) time in ConfigMgr console in its reports. So the only option is to edit the report individually and modified to show the local time as you needed. So following steps show you how to add the local time zone in to the reports.

In the following example I have used Remote Control – All remote control information report under Status Message – Audit section. So in the following outcome shows the UTC time when I run the report before the report modification. In my case I am in the (UTC+05:30) Sri Jayawardenepura time zone. But the report shows different time.

When I was running this report it was 7.16 PM in Local time. But report shows 1:46:41 PM. So how can I edit the report to get the local time zone to it? J..

clip_image002

Step 1- Right Click on the report and Select Edit option as follows.

clip_image003

Step 2- Then the report will open from Microsoft SQL Server Report Builder tool.

Step3- Once the Report Builder open the report Right Click the Data Set and Select Dataset Properties Tab as follows.

clip_image004

Step 4- On the Left side pane Select the Query Tab and Click the fx (Expression Builder Tab) to get the SQL Query.

clip_image005

Step 4- Once it opened the SQL Query which used to generate the report, just add the time zone you want using the additional commands to the existing query.

Note: before do any modification to these reports please remember to copy the full query and keep it as a backup. So in case of any issues you have the backup planWinking smile

So in my case I have added local time zone as 5:30 in to this report.

DATEADD(mi, 30, DATEADD(hh, 5, Time)) AS Time,

clip_image006

Step 6- After you modified the report query just Click OK twice to Exit and Save the modification using Save option in report builder tool.

Step 7- Once the modification done you can see the time zone is correct in the report. In my case it shows the correct time (7:46 pm) which I did a remote session to my Win7PC.

clip_image007

Thanks

Smile