Mail Archives: djgpp/1998/09/29/15:14:23
I'm having trouble with the strftime() function in time.h.
I've copied the example directly from libc.inf:
struct tm t;
char buf[100];
strftime(buf, 100, "%B %d, %Y", &t);
But I can't get it to work. What I wanted to do was to see what day it
was, but no matter how I use strftime, everything comes out zeros.
Eventually, I just used ctime() and used strstr() to search for a day in
the string. (Example: If the string contained "Sun" I set day = 0, if it
contained "Mon", day = 1, etc.)
So, how do I use strftime correctly? Any small sample code would be
appreciated.
TIA,
Tony Blaha
___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]
- Raw text -