SetSystemTime

what is the delphi function for SetSystemTime()  and SetSystemDate() ?
If delphi doesn't have functions for the above how do I do it.

Thanks
amielDorelAsked:
Who is Participating?
 
LMuadDIbConnect With a Mentor Commented:
procedure TForm1.Button1Click(Sender: TObject);
var
  dt: TSystemTime;
begin
  dt.wYear:=1999;
  dt.wMonth:=2;
  dt.wDay:=25;
  dt.wHour:=9;
  dt.wMinute:=0;
  dt.wSecond:=0;
  dt.wMilliseconds:=0;
  if SetSystemTime(dt) then Label1.Caption:='Setting finished';
end;


hope this helps,
^ENuD
0
 
LRHGuyCommented:
System time and date is all in one function:

The tSystemTime fields are:

    wYear
    wMonth
    wDayOfWeek
    wDay
    wHour
    wMinute
    wSecond
    wMilliseconds

var
  ST:tSystemTime;

procedure DoIt;
begin
  GetSystemTime(ST);
  ST.wDay:=ST.wDay+1;
  SetSystemTime(ST);
end;
0
 
LRHGuyCommented:
BTW, Get/SetSystemTime is in the Windows unit.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LRHGuyCommented:
Doesn't seem fair. I gave all the correct information first, yet my answer get ignored.
0
 
-Karamja-Commented:
LRHGuy that is so unfair, lol. You should of got the points
LMuadDIb had to spoon feed the code
0
 
LMuadDIbCommented:
spoon feed? or post an answer that is more clear?
0
 
amielDorelAuthor Commented:
I am sorry, I would have liked to accept multiple answers, you were all very helpfull

Thanks
 
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.