The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA 4.2.4-b591- need to find last login details of a user

Bose Kamineni
February 29, 2016

All,

JIRA version is JIRA 4.2.4-b591- and database is SQL server 2005

We want to find users who had logged into JIRA

There are tables in SQL server database  (propertystring) where last login information is stored but that is stored as ntext with values as - it is in millisec

1449598472094
1446121629766

Not able to convert them as date

I am wondering if any one have faced similar issue and there is a method to convert as a date and time

Thanks,

Bose Kamineni

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Sergio Betterelli _ACP-JA _ ACP-JSW_ __
Contributor
March 1, 2016

Hi Bose,

 

If you are using SQL Server 2005 you can try this query  (for JIRA 4):

SELECT cwd_user.user_name, dateadd(second,cast(cast(cwd_user_attributes.attribute_value AS nvarchar(255)) AS bigint)/1000,'19700101 00:00:00:000')
FROM cwd_user, cwd_user_attributes
WHERE cwd_user.id = cwd_user_attributes.user_id AND cwd_user_attributes.attribute_name = 'login.lastLoginMillis'

Thanks,

Sergio