Your question is based on a common but incorrect myth about plants using different gases at different times of day. Plants do not change how they respire at night; they actually take in oxygen and create carbon dioxide around the clock, the same as humans do. This is true of all aerobic organisms, a group which includes all plants, all animals, and anything else that has mitochondria in its cells. Mitochondria perform the function of respiration, in which glucose is broken down to release energy for the cell. If a cell is unable to respire, it will die very quickly.
Plants also do photosynthesis, a completely separate reaction which uses light energy to combine carbon dioxide and water into glucose molecules. During the daylight hours, plants respire and photosynthesize at the same time. In the dark, they stop doing photosynthesis but keep on respiring.
Since photosynthesis is a faster process than respiration, over a 24-hour periods most plants will produce more oxygen than carbon dioxide. The excess oxygen is what humans and animals depend on for breathing.