When we believe God, and act on that belief by repenting, confessing Him as Lord, and obey the commandment of baptism. Consider the conversion of Saul of Tarsus described in Acts 9 and Acts 22. Saul encountered a resurrected Christ, he was struck blind, he prayed, one was sent to tell him what he should do, he was healed, and he received a commission from God. YOUR SIN, calling on His name. Saul's sins are not removed until he obeyed the message from Christ, and was baptized.
Salvation depends on the initial removal of our sin during baptism.