티스토리 뷰

Delphi

procedure ReplaceTime(var DateTime: TDateTime; const NewTime: TDateTime);

C++

extern PACKAGE void __fastcall ReplaceTime(System::TDateTime &DateTime, const System::TDateTime NewTime);

Properties

Type

Visibility

Source

Unit

Parent

procedure

function

public

System.SysUtils.pas

System.SysUtils.hpp

System.SysUtils

System.SysUtils

Description

Replaces the time portion of a TDateTime value with a specified time.

ReplaceTime changes the value of the DateTime parameter so that it has the same time as the NewTime parameter.

The date portion of DateTime remains the same. 

ReplaceTime makes any necessary adjustments for negative dates (before 1900).

 

TDateTime 값의 시간 부분을 지정된 시간으로 바꿉니다.

ReplaceTimeNewTime 매개변수와 동일한 시간을 갖도록 DateTime 매개변수의 값을 변경합니다.

DateTime의 날짜 부분은 동일하게 유지됩니다.

ReplaceTime은 음수 날짜 (1900 년 이전)에 필요한 조정을 합니다.

 

Example

var

  ResultTime, StrTime:  TDateTime;

begin

  ResultTime := StrToDateTime('1111-01-11 14:25:39');

  StrTime := StrToDateTime('2017-04-18 21:32:20');

  ReplaceTime(ResultTime, StrTime);

 

  // 결과: 1111-01-11 오후 9:32:20

  Writeln(DateTimeToStr(ResultTime));

  Readln;

end.

 

remains 미국·영국 [rɪ|meɪnz]   영국식   중요

1. (사용하거나 먹거나 제거하거나 하고) 남은 것, 나머지
2.
유적
3. (
죽은 사람・동물의) 유해

remain 미국·영국 [rɪ|meɪn]   영국식   중요

1. 계속 …이다
2. (
없어지지 않고) 남다
3. (
처리・이행 등을 해야 할 일이) 남아 있다, 아직 …해야 하다

 

출처: http://docwiki.embarcadero.com/Libraries/XE2/en/System.SysUtils.ReplaceTime

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함