Vishy8015
06-07-05, 04:56 AM
Does Anybody Know How I Could Get Current Date (Short Date) In C Programming Language
13.12: How can I get the current date or time of day in a C program?
A: Just use the time(), ctime(), localtime() and/or strftime()
functions. Here is a simple example:
#include <stdio.h>
#include <time.h>
int main()
{
time_t now;
time(&now);
printf("It's %.24s.\n", ctime(&now));
return 0;
}
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.