This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to Terminate user as per their TimeZone

Hello All,

           I need to terminate an user as per their timezone. From HR we are getting user's Termination date and time. For example: 11/05/2018 05:00PM.

Case 1:

1. If user is in East Coast time zone, user need to be terminated at 5PM EST

Case 2: 

1. If user is in Central Time Zone, user need to be terminated at 6PM EST

Case 3:

1. If user is other country like (Europe, India etc..), user need to be terminated their 5PM time.

My database is configured to UTC time. When I check user's data in Object Browser it shows: 11/5/2018 5:00PM, Value shows 11/5/2018 10:00PM (Because of UTC time).  I have user's location data (contains country and State), depending upon, i need to calculate users timezone and terminate user.  I tried different queries, but unable to resolve the issue for all time zone users.  Here are the query I used:

  UID_Person in (

        select p.UID_Person

        from Person p

        left join DialogState c on c.UID_DialogState = p.UID_DialogState

        where p.EntryDate is not null

        and GetUTCDate() >= DateAdd(second, isnull(-(c.AVGUTCOffset), 0), p.Exitdate)

        and isinactive = 0

        )

 Any idea how to apply the logic?

Thanks In advance,

Jaipal.

Parents Reply
  • HI Markus,

                 I was trying to create Process Automation on ExitDate column, but unable to succeed.  So i have customized LastWorkingDate column with appropriate date and time.  Then created process automation on this column.  Everything working as expected.

    Thanks for the response.

    Thanks,

    Jaipal.

Children
No Data