The first question of Fatwa no. 4352
Q 1: Should the intention to fast Ramadan be formed at night or during the day? If someone is informed at forenoon that today is Ramadan, should one make up for it or not?
A: It is obligatory to form the intention to fast in the month of Ramadan at night, before Fajr (Dawn).
Starting the Sawm in the daytime does not suffice without prior intention.
So, if someone knows at forenoon that today is a day of Ramadan and then makes the intention to fast, it becomes obligatory on them to abstain from all that nullifies the Sawm until sunset. But they have to make up for that day, due to the Hadith related from Ibn ‘Umar, on the authority of Hafsah, (may Allah be pleased with them) that the Prophet (peace be upon him) said:
Anyone who has not formed the intention to fast before Fajr no Sawm counts for them.
(Related by Imam Ahmad, the Compilers of the Sunan [Imams Abu Dawud, Al-Tirmidhy, Al-Nasa’y and Ibn Majah], Ibn Khuzaymah, and Ibn Hibban, who classified it as Sahih [a Hadith that has been transmitted by people known for their uprightness and exactitude; free from eccentricity and blemish]and Marfu‘ [a Hadith narrated from the Prophet with a connected or disconnected chain of narration]) This ruling applies to the obligatory Sawm.
As for the supererogatory Sawm, it is permissible to form the intention to fast at daytime, if the person has not eaten, drunk, or had conjugal intercourse since Fajr.
This is because it is authentically reported from the Prophet (peace be upon him), on the authority of ‘Aishah (may Allah be pleased with her), that
He (peace be upon him) came to her one day at forenoon and said: ‘Do you have anything (any food)?’ She said, ‘No.’ He (peace be upon him) said, ‘Then I am fasting.’
(Related by Muslim in his Sahih [Book of Authentic Hadith])
May Allah grant us success! May peace and blessings be upon our Prophet Muhammad, his family, and Companions!
Permanent Committee for Scholarly Research and Ifta
Chairman – Shaykh Abdul-`Aziz ibn `Abdullah ibn Baz
source : http://www.alifta.net