This can be done in many ways, this is the one of them
- Create a Table with 2 columns
LoginDate
for date and UserName
for storing userId
- When an user logs in to the application just save the current date and his Id in the table.
before saving the data, add a condition that,if a row is already present for today's date, if so then just ignore it and login to the application, he is not a first user. - if there is no row present for today , then insert a new row with todays' date and the UserID. Greet him the text as First login user, since he is the first user for today.
- On every new insert, delete the old rows, if no audit required.
Take care of the coding part, come back if you need any help.