•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 363,381 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,864 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser:
Views: 258 | Replies: 3
![]() |
•
•
Join Date: May 2006
Location: homeworkhelp.co.in
Posts: 790
Reputation:
Rep Power: 4
Solved Threads: 59
You may check time.h for api defintions.
cout << Homework Help << Freelance Services << Top 10 Web Host;
cout << Build A Website << Interview Question And Answer << Tax Filing;
cout << Build A Website << Interview Question And Answer << Tax Filing;
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 9,908
Reputation:
Rep Power: 32
Solved Threads: 793
All files are automatically time stamped by the file system when saved or changed. So what else do you want to do with it ?
'Politics' is made up of two words, 'poli,' which is Greek for 'many,' and 'tics,' which are blood-sucking insects.
- Gore Vidal
Being ignorant is not so much a shame as being unwilling to learn. - Benjamin Franklin
- Gore Vidal
Being ignorant is not so much a shame as being unwilling to learn. - Benjamin Franklin
c Syntax (Toggle Plain Text)
#include <stdio.h> #include <time.h> int main () { time_t unixTime; FILE * fp; char stamp[32]; unixTime = time (NULL); fprintf (stamp,"timestamp: %ld\n", unixTime); if (fp = fopen("myfile.txt","a")) { fputs(stamp,fp); fclose(fp); } return 0; }
f you want to know what "unix time" is and how you can make it more meaningful to the average person... look up "time.h"
.
Last edited by jephthah : May 14th, 2008 at 5:40 pm.
I drink your milkshake.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C Marketplace
Similar Threads
- LastModified Timestamp of a file (C++)
- timestamp help? (PHP)
- Timestamp (Shell Scripting)
- Adding minutes to a timestamp (PHP)
- how to add a timestamp to scrolling lines? (Shell Scripting)
- mIRC timestamp (Windows Software)
Other Threads in the C Forum
- Previous Thread: Stack problem
- Next Thread: Reading a string buffer at the same "output line" as a previous text label



Linear Mode