The title of this post includes the words "timed", "sensor", ceiling" and "light" - with the request for advice concerning putting a "plug" onto it and "plugging" it into the nearest socket.
Many questions arise as a result !
Is this a "sensor light", intended to be mounted on a ceiling (or wall) - via "hard" wiring?
Otherwise, does it have a flexible cord attached, without a plug?
If so, with no plug, why no plug?
We await further information.
Of course, one can do many things.
Whether one should do many of those things is quite another question.