Last Login date/time stamp in crowd

Hi

I need help in retriving last login date/time stamp for all users in crowd. I looked at kb which give information about MYsql. We use SQL database. Could some one please provide the sql query?

https://confluence.atlassian.com/display/CROWDKB/List+the+Last+Login+Date+for+all+Users+in+Crowd

 

1 answer

1 accepted

2 votes

Which SQL database are you using?  MySQL is an SQL database, as is Oracle, PostGreSQL, Microsoft SQL Server, MariaDB etc etc etc.

Although, that doesn't really matter.  There are minor differences in syntax between them, but SQL for one of them is the same for most of them.  So the SQL you've found for MySQL should translate directly into whatever database you are using, as long as it's basic (select * from where, update x where, that sort of phrase) and not using clever functions.

We are using Mircrosoft sql server. sql query for crowd.png

02:15:42 [SELECT - 0 row(s), 0.000 secs] [Error Code: 195, SQL State: 42000] 'from_unixtime' is not a recognized built-in function name. ... 1 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.000/0.000 sec [0 successful, 0 warnings, 1 errors]

Ah, yes, a clever function. From (a creaking) memory, you can replace from_unixtime(12345) with dateadd(s,12345,1/1/1970)

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,950 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot