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
[44975] Re:N월에 마지막 날짜를......
크레브 [kkol] 938 읽음    2006-05-23 02:52
아래 함수들 중에 쓰면 될듯합니다.

extern PACKAGE Word __fastcall DayOfTheMonth(const System::TDateTime AValue);

Description

Call DayOfTheMonth to obtain the day of the month represented by a specified TDateTime value. DayOfTheMonth returns a value between 1 and 31.

Note:    DayOfTheMonth returns the same value as the DayOf function.
----------------------------------------------------------------------------------------------

extern PACKAGE Word __fastcall DaysInAMonth(const Word AYear, const Word AMonth);

Description

Call DaysInAMonth to obtain the number of days in the specified month of the specified year.

AYear is a year between 1 and 9999 (inclusive).

AMonth is a month between 1 and 12 (inclusive).

----------------------------------------------------------------------------------------------
extern PACKAGE Word __fastcall DaysInMonth(const System::TDateTime AValue);

Description

Call DaysInMonth to obtain the number of days in the month of the TDateTime value specified by AValue.

----------------------------------------------------------------------------------------------
extern PACKAGE System::TDateTime __fastcall EndOfAMonth(const Word AYear, const Word AMonth);

Description

EndOfAMonth returns the last expressible moment (11:59:59.999 PM) of the last day of a specified month.

The AYear parameter specifies the year of the desired month.

The AMonth parameter specifies the month. It can range from 1 to 12.

If the parameters do not specify a valid month, EndOfAMonth throws an EConvertError exception.





BlackNetwork 님이 쓰신 글 :
: 마지막 날짜를 가져 오고 싶습니다.....다음달에 1일을 가져 와서 -1일 해주면 될꺼 같은데- _-잘 안돼네요....~
: 부탁 드립니다.~

+ -

관련 글 리스트
44971 N월에 마지막 날짜를...... BlackNetwork 768 2006/05/22
44975     Re:N월에 마지막 날짜를...... 크레브 938 2006/05/23
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.