Reporting Group

 View Only
  • 1.  SEPM database reports Date Format issue

    Posted Oct 21, 2019 02:11 PM

    I am creating a SSRS report from the SEPM database that pulls a list of administrators and the last logins.  I'm having an issue getting it to format the date.  

    The result for a user that logged in at October 21, 2019 11:01:43 AM CDT is listed as 1571680629.

    So running a simple query:

    SELECT 
    USER_NAME,
    LASTCHANGE
     From 
    ADMINUSER

    Gives the CHANGEDATE as an Integer.  In the databse schema is lists the following description:

    ADMINUSER

    LASTCHANGE

    int

    4

       

    (CONVERT([int],getdate()))

    The last time that the user accessed the console.

    Any ideas on how to convert this to a readabe format?  

     

     



  • 2.  RE: SEPM database reports Date Format issue
    Best Answer

    Posted Oct 21, 2019 02:28 PM

    Think I got it.  

     

    SELECT 
    USER_NAME,
    LASTCHANGE,
    DOMAIN_ID,
    DATEADD(hour,-5,(dateadd(second ,LASTCHANGE, '1/1/1970'))) AS READABLE

     From 
    ADMINUSER



  • 3.  RE: SEPM database reports Date Format issue

    Posted Oct 21, 2019 02:32 PM