C++ Builder 參考手冊(cè) ? System::Dateutils ? MonthOfTheYear
這個(gè)日期時(shí)間所在的月份是這一年的第幾個(gè)月
頭文件:#include <System.DateUtils.hpp>
命名空間:System::Dateutils
函數(shù)原型:
System::Word __fastcall MonthOfTheYear(const System::TDateTime AValue);
參數(shù):
- AValue:日期時(shí)間類型變量;
返回值:
- 這個(gè)日期時(shí)間所在的月份是這一年的第幾個(gè)月佩耳,1 - 12谴蔑;
- 這個(gè)函數(shù)和 MonthOf 的結(jié)果相同的续滋,因?yàn)檫@一年的第幾個(gè)月和這個(gè)月的月份是相同的。
例:
#include <System.DateUtils.hpp>
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TDateTime dt = Sysutils::Now();
Memo1->Lines->Add(FormatDateTime(L"yyyy/mm/dd hh:nn:ss.zzz", dt));
Memo1->Lines->Add(MonthOf(dt));
Memo1->Lines->Add(MonthOfTheYear(dt));
}
相關(guān):
- System::Dateutils::MonthOfTheYear
- System::Dateutils::WeekOfTheYear
- System::Dateutils::DayOfTheYear
- System::Dateutils::HourOfTheYear
- System::Dateutils::MinuteOfTheYear
- System::Dateutils::SecondOfTheYear
- System::Dateutils::MilliSecondOfTheYear
- System::Dateutils::DateOf
- System::Dateutils::DateTimeToUnix
- System::Dateutils::DayOf
- System::Dateutils::DayOfTheMonth
- System::Dateutils::DayOfTheWeek
- System::Dateutils::DayOfTheYear
- System::Dateutils::DecodeDateTime
- System::Dateutils::EncodeDateTime
- System::Dateutils::HourOf
- System::Dateutils::MilliSecondOf
- System::Dateutils::MinuteOf
- System::Dateutils::MonthOf
- System::Dateutils::SecondOf
- System::Dateutils::TimeOf
- System::Dateutils::TryEncodeDateTime
- System::Dateutils::UnixToDateTime
- System::Dateutils::YearOf
- System::Dateutils
- System::Sysutils::CurrentYear
- System::Sysutils::Date
- System::Sysutils::DecodeDate
- System::Sysutils::DecodeDateFully
- System::Sysutils::DecodeTime
- System::Sysutils::EncodeDate
- System::Sysutils::EncodeTime
- System::Sysutils::FormatDateTime
- System::Sysutils::Now
- System::Sysutils::Time
- System::Sysutils::TryEncodeDate
- System::Sysutils::TryEncodeTime
- System::Sysutils::TryStrToDate
- System::Sysutils::TryStrToDateTime
- System::Sysutils::TryStrToTime
- System::Sysutils
C++ Builder 參考手冊(cè) ? System::Dateutils ? MonthOfTheYear