cancel
Showing results for 
Search instead for 
Did you mean: 

Convert lastLogonTimestamp Active Directory attribute to readable format in IdM

Former Member
0 Kudos

Hi:

I am trying to read LastLogonTimestamp from Active Directory into IdM. But this attribute is not usable for IdM. How can I convert this attribute to readable format for IdM?

Regards

Andy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

In the source statement of the To IDStore pass apply the case to the LogonTimeStamp column (lastlogon is not synced amongst domain controllers I think).

Example for SQL Server:

select

  case when lastlogon = '' then NULL

  else dateadd(mi,(cast(lastlogon as BIGINT)/600000000) - 157258080 + DATEDIFF(Minute,GetUTCDate(),GetDate()),0)

  end lastLogon

from test_ad_data

Adapted from conversion example I found on the net by "Number2 (John Nelson)"

Br,

Chris

Answers (2)

Answers (2)

terovirta
Active Contributor
0 Kudos

Is the value in same format as for valid to: http://scn.sap.com/thread/3232367

I have no idea but would try calculation based on Vellu's post.

regards, Tero

normann
Advisor
Advisor
0 Kudos

Hi Andy,

how does it look like when you print it to log? Can you share the string or a screenshot?

Cheers

Norman

Former Member
0 Kudos

Hi Norman:

The format was read into IdM as follow from initial load job.

The lastlogontimestamp was read in as

130209679778312227

129835474091795362