You can start by converting the date format into datetime
format. After that, you can use the hour
function to extract hours from the datetime and unique
function to obtain unique dates. Then, you can loop over the unique dates, and use find
function to subset the hours based on each date.
Here's an example code to subset based on hours only for each day:
main.m428 chars21 lines
This will output the hours for each unique date found in the datetime string.
gistlibby LogSnag