2008/12/25
std::string 의 날짜를 CTime에 넣기
MySQL의 DATE 함수에 의해 얻어진 std::string 문자열("YYY-MM-DD")을 CTime에 넣기.
Original Post : http://neodreamer-dev.tistory.com/229
// "1999-01-01"
// "0123456789"
std::string d = "1999-01-01";
CTime time(
atoi( d.substr(0, 4).c_str() ), // Year
atoi( d.substr(5, 2).c_str() ), // Month
atoi( d.substr(8, 2).c_str() ), // Day
0, 0, 0 /* Time */ );
Original Post : http://neodreamer-dev.tistory.com/229
Labels:
C++
,
CTime
,
Date
,
MYSQL
,
std::string
,
STL
,
TistoryOldPost
,
날짜변환
,
문자를 날짜로
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment