radamowi
asked on
Date/Time
How do I get the system date/time into the heading of a Report file? I'm (really) new to C.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This should work on most UNIX systems.
#include <stdio.h>
#include <time.h>
int main(void)
{
time_t t;
time(&t);
printf("Today's date and time: %s\n", ctime(&t));
return 0;
}
#include <stdio.h>
#include <time.h>
int main(void)
{
time_t t;
time(&t);
printf("Today's date and time: %s\n", ctime(&t));
return 0;
}
ASKER
I'll try it out as soon as I can ... Which will probably only be tomorrow. I'll let you know how it works out.
ASKER
Tried it! Tested it! Like it! "Merci beaucoup", which is French for: "I really appreciate your help in providing me with this solution"!
ASKER