Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Active Directory accountExpires convert to Date

Hi,

I'm having issues doing load script to convert LDAP accountExpire value to regular readable date.  I tried various things from simple calculation, to round function, to the date function and nothing takes.  It converts those that are Expired but when there is an actual date, the load returns dash - for the results. Has anyone done this before and have the scripted code?  My code is below:

Tried:

 

IF (accountExpires='9223372036854775807', 'Does Not Expire', if(accountExpires='0','Does Not Expire', if(accountExpires>'0', accountExpires/864000000000 - 109205)) as accountExpires,

I found the solution:

left(lastLogin,11)/86400-109205 as DLastLogin, 

left(lastlogin,11) to get the lastlogin in seconds

/86400 to convert to day

- 109207 : Nb of day between time origins

Anny

Community Browser