Variables containing date-, time- and datetime-values are always integers. They look like "dates" when a format is applied to them. So adding a format to the variable containing the maximum will solve the problem.
[pre]proc sql print;
select max(modate) format=datetime.
from sashelp.vtable;
quit;[/pre]
The 2025 SAS Hackathon has begun!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.