C++ Builder 参考手册 ➙ System::Sysutils ➙ ReplaceDate
更换一个日期时间的日期部分
头文件:#include <System.SysUtils.hpp>
命名空间:System::Sysutils
函数原型:
void __fastcall ReplaceDate(System::TDateTime &DateTime, const System::TDateTime NewDate);
参数:
- DateTime:日期时间类型数值,其中时间部分将要被替换;
- NewDate:日期时间类型数值,将要把其中的日期部分替换到 DateTime;
返回值:
- 这个函数把 DateTime 当中的日期部分更换为 NewDate 的日期部分,DateTime 当中的时间部分保留,函数直接修改 DateTime 参数值;
- 更换 TDateTime 类型变量当中的时间部分使用函数 ReplaceTime;
- 更换 TDateTime 类型变量当中的年、月、日、时、分、秒、毫秒等部分可以使用 System::Dateutils 里面的 RecodeYear、RecodeMonth、RecodeDay、RecodeHour、RecodeMinute、RecodeSecond、RecodeMilliSecond 等函数。
相关:
- System::Sysutils::IncMonth
- System::Sysutils::IncAMonth
- System::Sysutils::ReplaceTime
- System::Sysutils::ReplaceDate
- System::Sysutils::CurrentYear
- System::Sysutils::Now
- System::Sysutils::Date
- System::Sysutils::Time
- System::Sysutils::DecodeDate
- System::Sysutils::DecodeDateFully
- System::Sysutils::DecodeTime
- System::Sysutils::EncodeDate
- System::Sysutils::EncodeTime
- System::Sysutils::TryEncodeDate
- System::Sysutils::TryEncodeTime
- System::Sysutils::TryStrToDate
- System::Sysutils::TryStrToDateTime
- System::Sysutils::TryStrToTime
- System::Sysutils
- System::Dateutils::RecodeYear
- System::Dateutils::RecodeMonth
- System::Dateutils::RecodeDay
- System::Dateutils::RecodeHour
- System::Dateutils::RecodeMinute
- System::Dateutils::RecodeSecond
- System::Dateutils::RecodeMilliSecond
- System::Dateutils::RecodeDate
- System::Dateutils::RecodeTime
- System::Dateutils::RecodeDateTime
- System::Dateutils::TryRecodeDateTime
- System::Dateutils::IncYear
- System::Dateutils::IncDay
- System::Dateutils::IncWeek
- System::Dateutils::IncHour
- System::Dateutils::IncMinute
- System::Dateutils::IncSecond
- System::Dateutils::IncMilliSecond
- System::Dateutils::DayOfTheYear
- System::Dateutils::DayOfTheMonth
- System::Dateutils::DayOfTheWeek
- System::Dateutils::DayOf
- System::Dateutils::HourOf
- System::Dateutils::SecondOf
- System::Dateutils::MinuteOf
- System::Dateutils::MilliSecondOf
- System::Dateutils::DecodeDateTime
- System::Dateutils::EncodeDateTime
- System::Dateutils::TryEncodeDateTime
- System::Dateutils
C++ Builder 参考手册 ➙ System::Sysutils ➙ ReplaceDate