Is it possible to......... relating to time

Is it possible to do something like

If the time is not berween 00:00 and 06:00 then do something. If so are there any tutorials/examples

Thanks in advance

Yes it is possible.
Define your Do something

Have a look at: