C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[38600] Re:Re:[질문] 변환시 에러가 오전 이라는 문구 때문에...
진수.네모 [miman101] 1526 읽음    2005-01-01 07:35
감사합니다.

StrToDateTime 을 써 본결과 ...

DateTimeToStr 으로 문자열로 변환 --> 이를 가지고 다시 StrToDateTime 을 취해서 time 을 구하려 하면
에러가 발생합니다.

문자열로 변환시 2005-1-1 오전 7:00:00  이 나오는데... StrToDateTime 은  이 오전이라는 글자에서
에러를 나타내더군요...

찾아 보니 영문은 되는 거 같은데... DateTimeToStr 형태가 영문 형태로 변환되게 할 수는 없나요?

시간을 더하고 빼고 해야 되서 글자와 함께 왔다갔다 해야 되서..

민병권 님이 쓰신 글 :
: StrToDateTime(const AnsiString S) 라는 함수가 있네요.
: 근데, S에 잘못된 date/time format이 지정되면 EConvertError 에러를 뱉어 낸다고 되어 있네요.
: 도움말을 참고하세요.
:
: 아래는 도움말 원문입니다.
:
: Converts an AnsiString object to a TDateTime object.
:
: extern PACKAGE System::TDateTime __fastcall StrToDateTime(const AnsiString S);
:
: Description
:
: Call StrToDateTime to parse a string that specifies a date and time value. If S does not contain a valid date, StrToDateTime throws an EConvertError exception.
:
: The S parameter must use the current locale뭩 date/time format. In the US, this is commonly MM/DD/YY HH:MM:SS format. Specifying AM or PM as part of the time is optional, as are the seconds. Use 24-hour time (7:45 PM is entered as 19:45, for example) if AM or PM is not specified.
:
: Y2K issue:    The conversion of two-digit year values is determined by the TwoDigitYearCenturyWindow variable. For more information, see StrToDate.
:
: Note:    The format of the date and time string varies when the values of date/time formatting variables are changed.

+ -

관련 글 리스트
38593 [질문] 문자열을 시간으로 변환 방법은 어떻게? 진수.네모 856 2004/12/31
38604     Re:[질문] 문자열을 시간으로 변환 방법은 어떻게? 30억 1821 2005/01/03
38597     Re:[질문] 문자열을 시간으로 변환 방법은 어떻게? 민병권 1372 2004/12/31
38600         Re:Re:[질문] 변환시 에러가 오전 이라는 문구 때문에... 진수.네모 1526 2005/01/01
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.