Bumping this thread again. I've gotten custom date ranges to work with this method:
from arcgis.gis import GIS
gis = GIS('home')
item = arcgis.gis.Item(gis, itemid="########################")
date_1 = datetime.datetime(2023,7,2)
date_2 = datetime.datetime(2023,7,20)
usage_stats = item.usage(date_range=(date_1, date_2),as_df=True)
usage_stats
BUT, any custom dates over a year old fail. Well, technically I don't get an error. I just get an empty dataframe. Or an empty dictionary if I use "as_df = False".
Is this the expected behavior, or a bug?