Click to See Complete Forum and Search --> : display the time


Jumux
04-22-2003, 11:26 PM
whats a good way to display the time and date to a file using fprintf?

bwkaz
04-23-2003, 09:17 AM
man 2 time

man 3 ctime

String those two functions together (but read the manpages first, to get an understanding of how they work), then print the result with fprintf(fp, "%s", result); or similar.

inkedmn
04-23-2003, 12:59 PM
you@localhost:$ date > file.txt

shadowrider
04-24-2003, 03:22 AM
or simply....echo "Today is `date`":D

binaryDigit
04-24-2003, 10:44 AM
whats a good way to display the time and date to a file using fprintf?

you@localhost:$ date > file.txt
fprintf
echo "Today is `date`"
fprintf

you should read the question....

:rolleyes:

shadowrider
04-24-2003, 11:48 AM
Originally posted by binaryDigit
fprintf

fprintf

you should read the question....

:rolleyes:

opps....what was i thinking....sorry:o

inkedmn
04-24-2003, 03:44 PM
Originally posted by binaryDigit
you should read the question....

:rolleyes:

that was constructive. :rolleyes:

"If you're not part of the solution, you're the guy who craps on people who try to help (even if they are in error), but doesn't try to help solve the problem himself..."

or something like that.

binaryDigit
04-27-2003, 12:37 PM
Originally posted by inkedmn
that was constructive. :rolleyes:

"If you're not part of the solution, you're the guy who craps on people who try to help (even if they are in error), but doesn't try to help solve the problem himself..."

or something like that.
hmmm. considering the question was answered by bwkaz i didn't think any extra information would have been helpful. however being helpful means answering the question that was asked.
which is the point i was trying to make.
i apologize if you feel i was "crapping" on you. it was not the purpose of my post.