C++ Builder 参考手册 ➙ System::Dateutils ➙ SecondOfTheWeek
这个日期时间在所在周的第几秒钟 (ISO 8601)
头文件:#include <System.DateUtils.hpp>
命名空间:System::Dateutils
函数原型:
unsigned __fastcall SecondOfTheWeek(const System::TDateTime AValue);
参数:
- AValue:日期时间类型变量;
返回值:
- 这个日期时间在所在周的第几秒钟 (ISO 8601),从 0 开始:
0:星期一的 0 时 0 分 0 秒,1:星期一的 0 时 0 分 1 秒,…… - 可以用函数 StartOfTheWeek 得到一个日期时间的所在周的开始时间 (星期一的 00:00:00.000 时),可以用函数 EndOfTheWeek 得到一个日期时间所在周的结束时间 (星期日的 23:59:59.999);
- 用一个日期时间减去所在周的星期一 00:00:00.000,得到从星期一到这个日期时间经过的天数 (两个日期时间类型数值相减得到 double 类型的双精度浮点数,小数,例如 0.5 表示 12 个小时),天数乘以24就得到了小时数,再乘以60得到分钟数,再乘以 60 得到秒数。
相关:
- System::Dateutils::DateOf
- System::Dateutils::DateTimeToUnix
- System::Dateutils::DayOf
- System::Dateutils::DayOfTheMonth
- System::Dateutils::DayOfTheWeek
- System::Dateutils::DayOfTheYear
- System::Dateutils::DecodeDateMonthWeek
- System::Dateutils::DecodeDateTime
- System::Dateutils::DecodeDateWeek
- System::Dateutils::EncodeDateMonthWeek
- System::Dateutils::EncodeDateTime
- System::Dateutils::EncodeDateWeek
- System::Dateutils::HourOf
- System::Dateutils::HourOfTheMonth
- System::Dateutils::HourOfTheWeek
- System::Dateutils::HourOfTheYear
- System::Dateutils::IsValidDateMonthWeek
- System::Dateutils::IsValidDateWeek
- System::Dateutils::MilliSecondOf
- System::Dateutils::MilliSecondOfTheYear
- System::Dateutils::MinuteOf
- System::Dateutils::MinuteOfTheMonth
- System::Dateutils::MinuteOfTheWeek
- System::Dateutils::MinuteOfTheYear
- System::Dateutils::MonthOf
- System::Dateutils::MonthOfTheYear
- System::Dateutils::SecondOf
- System::Dateutils::SecondOfTheMonth
- System::Dateutils::SecondOfTheYear
- System::Dateutils::TimeOf
- System::Dateutils::TryEncodeDateTime
- System::Dateutils::UnixToDateTime
- System::Dateutils::WeekOfTheMonth
- System::Dateutils::WeekOfTheYear
- System::Dateutils::WeeksInYear
- 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 参考手册 ➙ System::Dateutils ➙ SecondOfTheWeek
网友评论