Hi all,
I'm a new SAS VA user. I'm using SAS VA 8.5.
I need to calculate the difference in hours between 2 datetime items. Particularly, to calculate "How many hours does it take between Lstupdt_Timestamp and Create_Timestamp?"
I tried to use TreatAs(Hour) but it didn't work. The result was incorrect (screenshots below).
I switched to TimePart but the result wasn't correct, either:
I don't know what went wrong. Any help would be much appreciated.
Thank you!
Have a look at this FAQ page: https://communities.sas.com/t5/SAS-Communities-Library/3-FAQs-on-date-calculations-in-SAS-Visual-Ana...
Have a look at the example below:
Have a look at this FAQ page: https://communities.sas.com/t5/SAS-Communities-Library/3-FAQs-on-date-calculations-in-SAS-Visual-Ana...
Have a look at the example below:
If you want to do this row by row from columns that are in your VA load table then you could calculate the difference in a new column in your source table before you load it into VA.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.