The mention of halva appeared in the 7th century and referred to a mixture of date puree and milk.

An excerpt from the article 14 facts about halva

By the 9th century, the term was used to refer to many types of sweets, including sweetened boiled farina or flour paste. Persian recipes were documented in the 13th-century book Kitab al-Tabikh (medieval Arab cookbook by Muhammad bin Hasan al-Baghdadi), as well as in a cookbook of unknown authorship from the 13th century Moorish Spain.