
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Tags:
- date_and_time
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
