2 Replies Latest reply: Aug 28, 2013 6:47 AM by Adam Davies RSS

    Active directory- last login & large numbers

    Adam Davies

      Hi All,


      I am trying to convert the last login time from AD into a date.


      Obviously I appreciate its held in integer8, but that conversion seems to work OK.


      The issue I have is that for some reason it is only working sometimes.... it has to be the data format but I can't figure it out at all!


      Here are the various things I have tried, and below is a snapshot of the data which shows it weirdly working for some but not others:






              num(num#(LastLogon)) as num,

              left(LastLogon,9) as left,

              right(LastLogon,9) as right,

              left(LastLogon,9) & right(LastLogon,9) as combined,

              evaluate(trim(LastLogon)) as lastlogon,

              Div(LastLogon, 1e10) & Mod(LastLogon, 1e10) As aLongNumber,

              Timestamp(evaluate(trim(LastLogon)) / 864000000000 - 109207) as last_logon,

              Timestamp(evaluate(LastLogontimestamp) / 864000000000 - 109207) as last_logon_timestamp