codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  asp Last Login Date  Archive Import (Dennis Briggs) at 23:50 on Saturday, June 28, 2003
 

I have a database that is a log file. Everytime a user logs on the log(databasee) is updated with username, time, date, etc. I have a scripte that querys database and displays DISTINCT username and count from table2.fldUserName. What I`m trying to do is get the last login Date of each user also. fldusername is a text field but fldDate is a time/date field. This is the code I use to get Distinct username and count.

SELECT DISTINCT Table2.fldUserName, Count(Table2.fldUserName) AS CountOffldUserName " & _
"FROM Table2 GROUP BY Table2.fldUserName ORDER BY COUNT(Table2.fldUserName) DESC

I was thinking something like this would work to get the last login date (LDate) but with no luck

"SELECT DISTINCT Table2.fldUserName, Date(Table2.fldDate) AS LDate " & _
"FROM Table2 GROUP BY Table2.fldUserName ORDER BY Date(Table2.fldDate) DESC"

Anyone willing to help?








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Codefest`11
•  Re: refresh parent after closing pop up window
•  Re: The Dim appExcel As Excel.Application doesn`t work ????
•  Re: Plz its urgent:validation code
•  Re: c# .net Exception of type System.StackOverflowException was thrown.
•  Re: need help with main()
•  Re: onclick thumbnail images in gridview or datalist
•  Re: adding a querystring parameter in a button click event
•  Re: Cookies - i have a hard time with them


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2011