当前位置:网站首页>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);边栏推荐
- ubuntu14安装MySQL并配置root账户本地与远程访问
- 采集抖音视频
- 为什么一定要从DevOps走向BizDevOps?
- [to.Net] C set class source code analysis
- Solidity - contract structure - error - ^0.8.4 NEW
- 奔赴山海之前,毕业季一定要做的那些事情
- ECS summer money saving secret, this time @ old users come and take it away
- Solution and summary of Nacos startup failure
- 记一次 .NET 差旅管理后台 CPU 爆高分析
- Solidity - truncated and checked modes of arithmetic operations - new features of 0.8.0
猜你喜欢

Solidity - 合约结构 - 错误(error)- ^0.8.4版本新增

DTD建模

研究了11种实时聊天软件,我发现都具备这些功能…

axure不显示元件库

EasyGBS网络不稳定情况下重复请求视频拉流问题的优化

wireshark报文分析tcp,ftp

线程的并行、并发、生命周期

Native JS creates a calendar - supports mouse wheel scrolling to select months - and can be ported to any framework

白盒加密技术浅理解

【Go ~ 0到1 】 第五天 7月1 类型别名,自定义类型,接口,包与初始化函数
随机推荐
宝,运维100+服务器很头疼怎么办?用行云管家!
Implement a Prometheus exporter
Nacos configuration file publishing failed, please check whether the parameters are correct solution
Bao, que se passe - t - il si le serveur 100 + O & M a mal à la tête? Utilisez le majordome xingyun!
The difference between indexof and includes
The intelligent epidemic prevention system provides safety guarantee for the resumption of work and production at the construction site
Summary of SQL query de duplication statistics methods
pickle. Load error [attributeerror: can't get attribute 'volatile' on < module '\u main']
见证时代!“人玑协同 未来已来”2022弘玑生态伙伴大会开启直播预约
【Go ~ 0到1 】 第五天 7月1 类型别名,自定义类型,接口,包与初始化函数
MFC中如何重绘CListCtrl的表头
ECS summer money saving secret, this time @ old users come and take it away
论文阅读【Learning to Discretely Compose Reasoning Module Networks for Video Captioning】
新版国标GB28181视频平台EasyGBS如何配置WebRTC视频流格式播放?
ffmpeg AVFrame 转 cv::Mat
音频编解码基础知识
直播HLS协议
Crunch简介、安装,使用Crunch制作密码字典
How to redraw the header of CListCtrl in MFC
从零开始学 MySQL —数据库和数据表操作