Is the child care necessary so that you and your spouse can work?
Only the parent that lived with the child more than half the year (custodial parent) can claim the child care credit.
Child care is "work related". It can only be claimed if the care was necessary so that you (and your spouse if married) could work. Only if the child lived with you more than half the year *and* the care was required so that you could work is it allowed. If you did not live with the child or work at the time that the care was provided then it was not necessary so that you could work and therefore is not allowed.
See IRS Pub 503.