当前位置:网站首页>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
边栏推荐
- Jerry's more accurate determination of abnormal address [chapter]
- SWAT—Samba WEB管理工具介绍
- SQLServer 查询数据库死锁
- 主流手机分辨率与尺寸
- 得到知识服务app原型设计比较与实践
- Wonderful review | deepnova x iceberg meetup online "building a real-time data Lake based on iceberg"
- UDP basic learning
- 【leetcode】102.二叉树的层序遍历
- 解决方案架构师的小锦囊 - 架构图的 5 种类型
- Introduction to data analysis 𞓜 kaggle Titanic mission (III) - > explore data analysis
猜你喜欢

Solution architect's small bag - 5 types of architecture diagrams

Diary of dishes | Blue Bridge Cup - hexadecimal to octal (hand torn version) with hexadecimal conversion notes

精彩回顾 | DEEPNOVA x Iceberg Meetup Online《基于Iceberg打造实时数据湖》

Sim Api User Guide(4)

Comparison and practice of prototype design of knowledge service app

Cve-2019-0708 vulnerability exploitation of secondary vocational network security 2022 national competition
MapReduce core and foundation demo

Six practices of Windows operating system security attack and defense

Swagger2 接口如何导入Postman

Introduction to wechat applet, development history, advantages of applet, application account, development tools, initial knowledge of wxml file and wxss file
随机推荐
链表相交(链表)
Sim Api User Guide(6)
Learning note 5 - gradient explosion and gradient disappearance (k-fold cross verification)
解决方案架构师的小锦囊 - 架构图的 5 种类型
LeetCode 1249. Minimum remove to make valid parents - FB high frequency question 1
Jerry's users how to handle events in the simplest way [chapter]
SQL Server recursive query of superior and subordinate
JVM - common parameters
Jerry sometimes finds that the memory has been tampered with, but there is no exception. How should he find it? [chapter]
Charles function introduction and use tutorial
242. Valid Letter ectopic words (hash table)
定义链表(链表)
What about Jerry's stack overflow? [chapter]
203、移出链表元素(链表)
MySQL how to merge the same data in the same table
Introduction to data analysis 𞓜 kaggle Titanic mission (III) - > explore data analysis
高价买来的课程,公开了!phper资料分享
707. Design linked list (linked list)
707、设计链表(链表)
59、螺旋矩阵(数组)