当前位置:网站首页>Gets the current time in character format
Gets the current time in character format
2022-04-23 10:48:00 【A dazed caddie】
#include <stdio.h>
#include <time.h>
#include <string.h>
int main ()
{
¦ time_t timer;
¦ struct tm *Now;
¦ char DateStr[40];
¦ time( &timer );
¦ Now = localtime( &timer );
¦ memset(DateStr, 0, 40);
¦ strftime(DateStr, 40, "%Y-%m-%d %I:%M:%S", Now);
¦ printf(" Current local time and date :%s\n", DateStr);
¦ return(0);
}
版权声明
本文为[A dazed caddie]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230618290833.html
边栏推荐
猜你喜欢

ID number verification system based on visual structure - Raspberry implementation

Notes on concurrent programming of vegetables (IX) asynchronous IO to realize concurrent crawler acceleration

Solve the problem of installing VMware after uninstalling
![Jerry's more accurate determination of abnormal address [chapter]](/img/ed/a08949bfc63823baf25fd57c324996.png)
Jerry's more accurate determination of abnormal address [chapter]

【leetcode】199. Right view of binary tree

Chapter 120 SQL function round

基于PyQt5实现弹出任务进度条功能示例

How to quickly download vscode

Learning note 5 - gradient explosion and gradient disappearance (k-fold cross verification)

/etc/shadow可以破解吗?
随机推荐
Problems of class in C # and database connection
Charles function introduction and use tutorial
得到知识服务app原型设计比较与实践
JVM——》常用命令
24. Exchange the nodes in the linked list (linked list)
Download and installation steps of xshell + xftp
59. Spiral matrix (array)
Leetcode22:括号生成
中职网络安全2022国赛之CVE-2019-0708漏洞利用
Understand the new economic model of platofarm and its ecological progress
JVM - common parameters
Strongest date regular expression
349、两个数组的交集
Define linked list (linked list)
349. Intersection of two arrays
CentOS/Linux安装MySQL
Installing MySQL with CentOS / Linux
解决方案架构师的小锦囊 - 架构图的 5 种类型
Yarn resource scheduler
203、移出链表元素(链表)