Time based logic in dial plans

Hello again everyone…

Has anybody got an example of a dial plan with integrated logic based on time? Is it possible?

eg.
if time >18:00 and number starts with 07 dial using providera

else if time <08:00 and number starts with 07 dial using providera

else dial using providerb

end if

Any help appreciated

voip-info.org/wiki/view/Asterisk+func+iftime

this wiki is your best friend and should be your first point of reference for these questions.