Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
boaz_shatz
Contributor II
Contributor II

convert to date the lastlogontimestamp from the active directory user properties

this field is the number of 100 nano seconds that passed since 1.1.1601 00:00 to last login of the user (this is of course a very great number) how do i convert it to date using qlikview script on reload time

1 Solution

Accepted Solutions
pdumas
Partner - Contributor III
Partner - Contributor III

Hi,

the conversion formula I suggest is : left(lastLogin,11)/86400-109207 as DLastLogin,

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

/86400 to convert to day

- 109207 : Nb of day between time origins

Regards

Pierre.

View solution in original post

2 Replies
Not applicable

Dates in QV are stored as integers

You can see this by creating a field with value =num(today())

Whole integers being days

Partial days are represented by dividing up a day

I believe 1 hour would be .04166666...

pdumas
Partner - Contributor III
Partner - Contributor III

Hi,

the conversion formula I suggest is : left(lastLogin,11)/86400-109207 as DLastLogin,

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

/86400 to convert to day

- 109207 : Nb of day between time origins

Regards

Pierre.