Wa `alaykum As-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- If one intends to observe a voluntary fasting on the morning of the day itself, his fasting is valid and he will receive a reward for it.
2- However, the reward he will receive will not be the same as the reward of the one who fasted the whole day. He will be rewarded in the general sense of the reward for fasting during the month of Muharram.
With regard to your question about forming the intention on the same day, there is sound evidence from the Prophet (peace and blessings be upon him) that the intention to observe a voluntary fasting formed on the morning of the day itself is valid, as long as the person has not ingested anything that breaks the fasting after dawn.
`A’ishah (may Allah be pleased with her) narrated that the Prophet (peace and blessings be upon him) entered upon his family one day and said: “Do you have anything (i.e., any food)?” They said, “No.” He said, “Then I am fasting.” (Muslim)
The word idhan (translated here as “then,”) indicates that it is permissible to form an intention to observe a voluntary fast on the day itself. This is unlike the obligatory fasts, which are not valid unless one forms the intention the night before, based on the following hadith, “Whoever does not form the intention to fast before dawn, has not fasted.” (Abu Dawud and At-Tirmidhi) This Hadith refers to obligatory fasts. Based on this, your fast is valid.
With regard to the question about whether you will receive the reward for fasting for the whole day or from the time of the intention only, the late Saudi Muslim scholar, Sheikh Ibn `Uthaymeen, said:
There are two scholarly opinions on this matter. The first is that he will be rewarded from the beginning of the day, because the correct Islamic fasting is only from the beginning of the day.
The second view is that he will only be rewarded from the time of his intention, and if he formed the intention at midday then he will be rewarded for half a day.
This is the correct view because the Prophet (peace and blessings be upon him) said, “The reward of deeds depends upon the intentions and every person will get the reward according to what he has intended.” (Al-Bukhari)
This man only formed his intention during the day, so he will be rewarded from the time he formed the intention.
Based on the correct opinion, if a fast is connected to a particular day, such as fasting on Mondays and Thursdays, and fasting on the 13th, 14th and 15th of each Hijri month or fasting three days each month, and the person forms his intention during the day, he will not be rewarded for the entire day. (Al-Sharh al-Mumti`, 6/373)
The same applies to the case of one who did not intend to fast `Ashura’ until after dawn had come. In this case he will not receive the reward for fasting `Ashura’, which is the expiation of one year, because his case is not like that of the person who fasted the whole day. His fast is counted from the moment he first formed his intention to fast.
He will, however, be rewarded in the general sense of the reward for fasting during the month of Muharram, which is the best kind of fasting after Ramadan. (Al-Sharh al-Mumti`, 6/471)
Allah Almighty knows best.
Excerpted with modifications from: www.islamqa.info