如何将显示时间设置为特定值 [英] How to set the display time to a specific value

查看:80
本文介绍了如何将显示时间设置为特定值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将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 so it 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 .com / change-date-format-windows-7-ddmmyyyy


这篇关于如何将显示时间设置为特定值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆