Intention is a condition for the validity of fasting like other acts of worship.
But if the fast is voluntary, there is no harm if the intention is made in the day time if he has not taken anything which would break the fat after the dawn break. We said, no . Then I am fasting , he said. According to the majority of scholars, it is not permissible. If one comes and finds the line complete, he should try to get a gap between two people in the line by bringing them nearer.