Chinaunix首页 | 论坛 | 博客
  • 博客访问: 196288
  • 博文数量: 63
  • 博客积分: 1002
  • 博客等级: 准尉
  • 技术积分: 640
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-11 20:34
文章分类

全部博文(63)

文章存档

2017年(2)

2015年(3)

2013年(4)

2012年(21)

2011年(33)

分类: LINUX

2011-03-20 13:37:03

#include  
#include  
#include  

int Show(void) 

  char str[100]; 
  time_t t; 
  struct tm *lt; 
  t = time(NULL); 
  lt = localtime(&t); 
  strftime(str,100,"%Y-%m-%d %H:%M:%S ",lt); 
  printf("当前日期及时间是:\n%s\n",str); 
  getch(); 
  return 0; 


main()
{
Show();
}
阅读(538) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~