Good afternoon,
I would like to calculate the average time for all records for the columns of time_arrival and time_attend. However, one is display as character and one is display as time. How can I do this? Thanks
Do the conversion for the one that's a character and subtract them.
And results:
Here's a great, but longer and in depth, reference for dates and times in SAS
https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/...
@EPANG1 wrote:
Good afternoon,
I would like to calculate the average time for all records for the columns of time_arrival and time_attend. However, one is display as character and one is display as time. How can I do this? Thanks
The question is: why is a time stored as character? Check how this data arrived in SAS, and fix it there.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.