Question : select the most recent date in mssql

Hello

i have a sql statement and i have a table that has names that are the same but have dif times/date.How can i select the most recent time and date.

   sqlstmt = "SELECT DISTINCT Name,TapeNum,Date FROM TS_Backup_Tapes "

Answer : select the most recent date in mssql

>>i have this in my code but it tells me that date is not found iun my collection

CODE
_______________________________________________________________________
       sqlstmt = "SELECT DISTINCT Name,TapeNum, MAX(Date) FROM TS_Backup_Tapes GROUP BY Name,TapeNum"
<<

Maybe you need to put a name to the column

1:
sqlstmt = "SELECT Name,TapeNum, MAX(Date) Date FROM TS_Backup_Tapes GROUP BY Name,TapeNum
Random Solutions  
 
programming4us programming4us