Clinically. It is usually a clinical diagnosis based on the presentation. Sometimes we will get stool studies depending on the clinical circumstances.
Food poisoning. Based on your symptoms and history both are usually treated with management of symptoms and hydration.
Symptoms. It is often obvious by the history and the symptoms. The flu usually lasts longer. Food poisoning is usually short lived. Both need rest and hydration.