Motion sensor video time based

I want to create a video when a sensor goes off but with a time restriction like 11pm - 6am only.

You can set a basic schedule for event recordings in the Event Recording section of the camera’s settings. You can also create more complicated schedules using the Shortcuts feature. Instructions for both can be found in the user guide under the Support link, top right.

The first part did not work, I set notification on camera for 11pm - 6am but it still recorded events from sensor after 6am