•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 427,101 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,202 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: Programming Forums
Views: 340 | Replies: 3
![]() |
•
•
Join Date: May 2006
Location: ★ ijug.net ★
Posts: 939
Reputation:
Rep Power: 5
Solved Threads: 67
You may check time.h for api defintions.
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,197
Reputation:
Rep Power: 38
Solved Threads: 932
All files are automatically time stamped by the file system when saved or changed. So what else do you want to do with it ?
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
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.
Why so serious?
![]() |
•
•
•
•
•
•
•
•
DaniWeb C Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
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