The fast is not valid, because the fast must be from dawn until sunset, because Allaah says (interpretation of the meaning):
“So now have sexual relations with them and seek that which Allaah has ordained for you (offspring), and eat and drink until the white thread (light) of dawn appears to you distinct from the black thread (darkness of night), then complete your Sawm (fast) till the nightfall”
Based on this, you will not have the reward for this day that you fasted, because it was not in accordance with sharee’ah, but there is no sin on you for that, because it is permissible for a person to break a supererogatory fast. You do not have to offer expiation either. Expiation is not required for any fast, even an obligatory one, except if a person has intercourse with his wife during the day in Ramadan and they are among those who are obliged to fast. In that case the expiation is obligatory upon him and on her if she did it willingly, and the expiation is to free a slave; if that is not possible, then it is to fast two consecutive months; if you cannot fast, then it is to feed sixty poor persons. But if the husband and wife were not obliged to fast, such as if they were travelling during Ramadan and he had intercourse with her, then there is no sin on him or on her, because it is permissible for the traveller to break the fast. But they have to make up that day when they come back from their journey. Even if we assume that they were fasting on that day but they were travelling, it is permissible for them to break the fast and then have intercourse, and there is no sin on them for that, and they do not have to offer expiation; rather they have to make up that day on which they broke the fast. End quote.
Shaykh Muhammad ibn ‘Uthaymeen (may Allaah have mercy on him)