It was narrated from Hafsah that the Prophet said:
"Whoever does not have the intention of fasting from the night before, then there is no fast for him." (Daif)