bjwf · 2004-12-17 03:32:43 · 阅读: 747 一般的办法是这样: char txt[256]; sprintf(txt, "%04d-%02d-%02d", 2004, 12, 20);