Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!uc!cs.umn.edu!ux.acs!edh From: edh@ux.acs.umn.edu (Merlinus Ambrosius) Newsgroups: comp.lang.c Subject: Where is strftime(.....)? Message-ID: <2048@ux.acs.umn.edu> Date: 10 Aug 90 21:59:21 GMT Reply-To: edh@ux.acs.umn.edu (Eric D. Hendrickson) Organization: (n) The process of becoming an organ. Lines: 21 In the standard library in K&R (ANSI) on page 256 there is a very nice looking procedure for formatting the current time into whatever form you like. It doesn't seem to be present on this system, or on a local Sparc. Anybody know where I can get this? What it does (according to the book) is: size_t strftime(char *s, size_t smax, const char *fmt, const struct tm *tp) It formats date and time info from *tp into s according the fmt, using a printf-like format. i.e. "%y%m%d %H%M%S" would put 900810 045835 into s. This is similar to how "date" does it too, of course, but if something like strftime already exists, I could sure use it! All help is appreciated, Eric Hendrickson -- /---------"Oh carrots are divine, you get a dozen for dime, its maaaagic."--- |Eric (the "Mentat-Philosopher") Hendrickson Academic Computing Services |edh@ux.acs.umn.edu The game is afoot! University of Minnesota \----"What does 'masochist' and 'amnesia' mean? Beats me, I don't know."---