Time of day

Discussion about Code Builder Builder and Winlog language support.
Post Reply
mathias
Posts: 18
Joined: Thu Oct 06, 2011 9:40 am

Time of day

Post by mathias »

Is it possible to show the actual time of day (time of the PC) in a label? I tried to use “GetTimeString(":")” but i don’t find a solution.

Thanks
Attachments
time.JPG
time.JPG (9.69 KiB) Viewed 5677 times
User avatar
admin
Site Admin
Posts: 373
Joined: Tue Nov 17, 2009 1:18 pm

Re: Time of day

Post by admin »

Hi,
yes, it is possible.
- Create a string gate with your desired name such as "DateTime".

- Enter in the Winlog code this function:

Code: Select all

Function void DateTime()
#startup
While(WindowIsOpen())
SetStrGateValue("DateTime", 0, GetTimeString(":"));
Sleep(1000);
end
end
- Attach the gate to the label in the template.
Post Reply