The effects of marijuana consumption can last for:

When marijuana is smoked, it can begin to affect the smoker within minutes and effects can last for between two and four hours. When marijuana is eaten, it may take over an hour to begin to affect the consumer, but the effects of the marijuana may last for more than six hours.
DMV Writen Test