我想将PC上的时间与外部源(PLC)同步。
I want to synchronize the time on my PC to an external source (a PLC).
从PLC中我得到的时间是YYYY,MM,DD,...... ,mm,ss。
From the PLC I get the time in YYYY, MM, DD, hh, mm, ss.
然后我想让PC显示同一时间。
Then I want to make the PC display the same time.
这是怎么做的?
我找到了一个命令SetDateTime - 但是在这里我进入了UTC和时区问题....
I found a command SetDateTime - but here I get into UTC and time zone issues....
我想要的只是让PC显示我来自PLC的时间!来自PLC的时间已经具有时区和夏令时信息,因此它是正确的时间!
All I want is simply make the PC display the time I have from the PLC! The time from the PLC already has the time zone and daylight saving information soit is the correct time as it is!
推荐答案
杰克,
在VBA使用格式函数中:
In VBA use format function:
格式(" 2015-10-07 12 :16:21"," YYYY,MM,DD,hh,mm,ss")
format("2015-10-07 12:16:21" ,"YYYY, MM, DD, hh, mm, ss")
对于计算机系统,更改区域格式日期和时间:
For computer system, change regional format date and time:
http://www.sysprobs / change-date-format-windows-7-ddmmyyyy
更多推荐
如何将显示时间设置为特定值
发布评论