This is an open-label, single arm, study of sapacitabine administered in alternating cycles with decitabine in elderly patients with previously untreated AML (Part 1) or concomitantly with venetoclax in adult patients with relapsed or refractory AML or MDS (Part 2). Treatment will be administered on an outpatient basis. One treatment cycle is 4 weeks.