当前位置:网站首页>Botu V16 obtains the system time and converts it into a string
Botu V16 obtains the system time and converts it into a string
2022-07-01 19:36:00 【WX_ LW】
// Get system time
#nSystemTime := RD_SYS_T(#stSystemTime);
// Convert to string
#sYear := '';
VAL_STRG(IN := #stSystemTime.YEAR,
SIZE := 4,
PREC := 0,
FORMAT := 0,
P := 1,
OUT => #sYear);
#sMonth := '';
IF #stSystemTime.MONTH < 10 THEN
VAL_STRG(IN := #stSystemTime.MONTH,
SIZE := 1,
PREC := 0,
FORMAT := 0,
P := 1,
OUT => #sMonth);
#sMonth := CONCAT(IN1 := '0', IN2 := #sMonth);
ELSE
VAL_STRG(IN := #stSystemTime.MONTH,
SIZE := 2,
PREC := 0,
FORMAT := 0,
P := 1,
OUT => #sMonth);
END_IF;
#sDay := '';
IF #stSystemTime.DAY < 10 THEN
VAL_STRG(IN := #stSystemTime.DAY,
SIZE := 1,
PREC := 0,
FORMAT := 0,
P := 1,
OUT => #sDay);
#sDay := CONCAT(IN1 := '0', IN2 := #sDay);
ELSE
VAL_STRG(IN := #stSystemTime.DAY,
SIZE := 2,
PREC := 0,
FORMAT := 0,
P := 1,
OUT => #sDay);
END_IF;
#sHour := '';
IF #stSystemTime.HOUR < 10 THEN
VAL_STRG(IN := #stSystemTime.HOUR,
SIZE := 1,
PREC := 0,
FORMAT := 0,
P := 1,
OUT => #sHour);
#sHour := CONCAT(IN1 := '0', IN2 := #sHour);
ELSE
VAL_STRG(IN := #stSystemTime.HOUR,
SIZE := 2,
PREC := 0,
FORMAT := 0,
P := 1,
OUT => #sHour);
END_IF;
#sMinute := '';
IF #stSystemTime.MINUTE < 10 THEN
VAL_STRG(IN := #stSystemTime.MINUTE,
SIZE := 1,
PREC := 0,
FORMAT := 0,
P := 1,
OUT => #sMinute);
#sMinute := CONCAT(IN1 := '0', IN2 := #sMinute);
ELSE
VAL_STRG(IN := #stSystemTime.MINUTE,
SIZE := 2,
PREC := 0,
FORMAT := 0,
P := 1,
OUT => #sMinute);
END_IF;
#sSecond := '';
IF #stSystemTime.SECOND < 10 THEN
VAL_STRG(IN := #stSystemTime.SECOND,
SIZE := 1,
PREC := 0,
FORMAT := 0,
P := 1,
OUT => #sSecond);
#sSecond := CONCAT(IN1 := '0', IN2 := #sSecond);
ELSE
VAL_STRG(IN := #stSystemTime.SECOND,
SIZE := 2,
PREC := 0,
FORMAT := 0,
P := 1,
OUT => #sSecond);
END_IF;
#sSystemTime := CONCAT(IN1 := #sYear, IN2 := '-');
#sSystemTime := CONCAT(IN1 := #sSystemTime, IN2 := #sMonth);
#sSystemTime := CONCAT(IN1 := #sSystemTime, IN2 := '-');
#sSystemTime := CONCAT(IN1 := #sSystemTime, IN2 := #sDay);
#sSystemTime := CONCAT(IN1 := #sSystemTime, IN2 := '-');
#sSystemTime := CONCAT(IN1 := #sSystemTime, IN2 := #sHour);
#sSystemTime := CONCAT(IN1 := #sSystemTime, IN2 := ':');
#sSystemTime := CONCAT(IN1 := #sSystemTime, IN2 := #sMinute);
#sSystemTime := CONCAT(IN1 := #sSystemTime, IN2 := ':');
#sSystemTime := CONCAT(IN1 := #sSystemTime, IN2 := #sSecond);边栏推荐
- Task: denial of service DOS
- 241. Different Ways to Add Parentheses
- 【英语语法】Unit1 冠词、名词、代词和数词
- 宝,运维100+服务器很头疼怎么办?用行云管家!
- 记一次 .NET 差旅管理后台 CPU 爆高分析
- Bao, que se passe - t - il si le serveur 100 + O & M a mal à la tête? Utilisez le majordome xingyun!
- 下载(导出)pdf模板文件(比如:审批单),报错:Invalid nested tag *** found, expected closing tag ***
- Flutter 实战-快速实现音视频通话应用
- DTD modeling
- Team up to learn! 14 days of Hongmeng equipment development "learning, practicing and testing" practical camp, free of charge!
猜你喜欢
Use the uni app demo provided by Huanxin to quickly realize one-on-one chat

奔赴山海之前,毕业季一定要做的那些事情

新版国标GB28181视频平台EasyGBS如何配置WebRTC视频流格式播放?

Summary of SQL query de duplication statistics methods

ddr4测试-2

大厂音视频职位面试题目--今日头条
![[go ~ 0 to 1] day 5 July 1 type alias, custom type, interface, package and initialization function](/img/1e/bed6a761f07c052e43b1e3b1701760.png)
[go ~ 0 to 1] day 5 July 1 type alias, custom type, interface, package and initialization function

精耕渠道共谋发展 福昕携手伟仕佳杰开展新产品培训大会

Instagram 为何从内容共享平台变成营销工具?独立站卖家如何利用该工具?

Bao, what if the O & M 100+ server is a headache? Use Xingyun housekeeper!
随机推荐
Actual combat of flutter - fast implementation of audio and video call application
web开发常用的开源框架的开源协议整理
微信小程序 navigator点击后有阴影 ,去掉navigator阴影效果
Ffmpeg avframe to cv:: mat
Lean thinking: source, pillar, landing. I understand it after reading this article
测试自学人必看:软件测试如何找测试项目?
Native JS creates a calendar - supports mouse wheel scrolling to select months - and can be ported to any framework
Intensive cultivation of channels for joint development Fuxin and Weishi Jiajie held a new product training conference
Compile ffmpeg source code with msys+vs2019 under win10
H264 encoding profile & level control
wireshark报文分析tcp,ftp
Interview questions for audio and video positions in Dachang -- today's headline
【森城市】GIS数据漫谈(一)
寶,運維100+服務器很頭疼怎麼辦?用行雲管家!
Ffmpeg error code
【To .NET】C#集合类源码解析
面试题 16.16. 部分排序-双指针法
为什么一定要从DevOps走向BizDevOps?
ffmpeg AVFrame 转 cv::Mat
精耕渠道共谋发展 福昕携手伟仕佳杰开展新产品培训大会