home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / U-Z / VideoToolBox Folder / VideoToolboxSources / DateString.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-21  |  444 b   |  14 lines  |  [TEXT/KAHL]

  1. #include "VideoToolbox.h"
  2.  
  3. char *DateString(unsigned long seconds)
  4. /* returns a pointer to a string representing the time in a form suitable for
  5. use as a unique filename extension, e.g. "89.06.25.01.59.59", that 
  6. sorts in chronological order */
  7. {
  8.     DateTimeRec t;
  9.     static char dateString[26];
  10.     
  11.     Secs2Date(seconds,&t);
  12.     sprintf(dateString,"%02d.%02d.%02d.%02d.%02d.%02d",t.year-1900,t.month,t.day,t.hour,t.minute,t.second);
  13.     return dateString;
  14. }