当前位置:网站首页>Common date formatter and QT method for obtaining current time
Common date formatter and QT method for obtaining current time
2022-06-24 08:30:00 【Pepsi__】
Common date formatter and its meaning :
| character | significance |
|---|---|
| yy | year , Two digit display ,00-99 |
| yyyy | year , Four digit display , Such as 2016 |
| M | month , Display without zero padding ,1-12 |
| MM | month , Zero filling display ,01-12 |
| d | God , Display without zero padding ,1-31 |
| dd | God , Zero filling display ,01-31 |
| h | Hours , No zeros ,0-23 or 1-12( If it shows AM/PM) |
| hh | Hours , Zero compensation 2 Bit display ,00-23 or 01-12( If it shows AM/PM) |
| H | Hours , No zeros ,0-23 or 1-12( Even if it shows AM/PM) |
| HH | Hours , Zero compensation 2 Bit display ,00-23 or 01-12( Even if it shows AM/PM) |
| m | minute , No zeros ,0-59 |
| mm | minute , Zero filling display ,00-59 |
| z | millisecond , No zeros ,0-999 |
| zzz | millisecond , Zero compensation 3 Bit display ,000-999 |
| AP or A | Use AM/PM Show |
| ap or a | Use am/pm Show |
Text conversion date :
QDateTime dateTime = QDateTime::fromString("2022/06/23 23:05:24","yyyy/MM/dd hh:mm:ss");
Date conversion text :
QString timeStr = QDateTime::currentDateTime().toString("yyyy year MM month dd Japan hh when mm branch ss second ");
QString timeStr1 = dateTime.toString("yyyy year MM month dd Japan hh when mm branch ss second ");
边栏推荐
- ZUCC_编译语言原理与编译_实验02 FSharp OCaml语言
- [acnoi2022] I have done it, but I can't
- 2021-03-11 COMP9021第八节课笔记
- RCNN、Fast-RCNN、Faster-RCNN介绍
- 2021-03-11 comp9021 class 8 notes
- FPGA的虚拟时钟如何使用?
- ZUCC_编译语言原理与编译_实验04 语言与文法
- Ordinary token
- Four models of iPhone 13 series have been exposed, and indeed, they are 13 fragrant!
- How to implement approval function in Tekton
猜你喜欢

Markdown 实现文内链接跳转

2021-03-16 COMP9021第九节课笔记

小样本故障诊断 - 注意力机制代码 - BiGRU代码解析实现

Use of swift basic closure /block (source code)

ZUCC_编译语言原理与编译_实验03 编译器入门

2021-03-11 comp9021 class 8 notes

2021-03-09 comp9021 class 7 Notes

List of Li Bai's 20 most classic poems
![Fundamentals of 3D mathematics [17] inverse square theorem](/img/59/bef931d96883288766fc94e38e0ace.png)
Fundamentals of 3D mathematics [17] inverse square theorem

MAYA重新拓布
随机推荐
MAYA重新拓布
11--无重复字符的最长子串
2022年流动式起重机司机特种作业证考试题库及在线模拟考试
Export MySQL database to xxx SQL, set xxx The SQL file is imported into MySQL on the server. Project deployment.
Robot acceleration level task priority inverse kinematics
etcd备份恢复原理详解及踩坑实录
Final review and key points of software process and project management
longhorn安装与使用
Transformers pretrainedtokenizer class
Question bank and simulation examination for operation certificate of refrigeration and air conditioning equipment in 2022
Nodejs redlock notes
Promise的使用場景
FPGA的虚拟时钟如何使用?
权限模型 DAC ACL RBAC ABAC
论文笔记: 多标签学习 DM2L
到底哪一首才是唐诗第一?
2021-06-24: find the length of the longest non repeating character substring in a string.
Swift foundation features unique to swift
[real estate opening online house selection, WiFi coverage temporary network] 500 people are connected to WiFi at the same time
Markdown 实现文内链接跳转