Derek Tan's Blog

How to represent date time data in Bam in local time

If you are using the tracking profile editor to map orchestration shapes/events to BAM activity, the date time value that appears in views and cubes will be in UTC (Coordinated Universal Time) time. With a little tweaking of a stored procedure for each activity, you can display the date time value in your local time.

The stored procedure to modify is: bam_<Activity Name>_PrimaryImport. Add the following couple of lines in this stored procedure:

DECLARE @TimeDifference int
SELECT @TimeDifference = ROUND(DATEDIFF(mi, GetUTCDate(), GetDate()), -1)

For each variable of datetime type passed into this stored procedure, add the following:

SELECT @yourVariable = DATEADD(mi, @TimeDifference, @yourVariable)

That's it!

I want to thank Seong Joon Kwak for asking the question and going through a couple of solutions before I arrive at this simple solution.

 

Published Friday, June 10, 2005 6:38 PM by derektan

Comments

 

The corner store said:









Note: This information applies to Tracking Profile Editor in BizTalk Server 2006
You...
February 23, 2006 6:54 PM
 

The corner store said:

Note: This information applies to Tracking Profile Editor in BizTalk Server 2006 You may face situations

October 23, 2006 12:53 PM
 

Jeffrey Chilberto said:

As BAM tracks activity using UTC , I am trying to find a way to get my aggregate views with a progress

October 2, 2007 4:25 PM
 

Derek Tan s Blog How to represent date time data in Bam in local time | storage bench said:

June 19, 2009 4:22 AM
New Comments to this post are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker