home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 18980 < prev    next >
Encoding:
Text File  |  1992-12-29  |  955 b   |  30 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!uwm.edu!psuvax1!psuvm!epa100
  2. Organization: Penn State University
  3. Date: Tue, 29 Dec 1992 13:34:07 EST
  4. From: <EPA100@psuvm.psu.edu>
  5. Message-ID: <92364.133407EPA100@psuvm.psu.edu>
  6. Newsgroups: comp.lang.c
  7. Subject: date format
  8. Lines: 20
  9.  
  10. I am trying to write a simple program in turbo c and can not for the life of me
  11. figure out how to do it. what I am attempting is as follows
  12.  
  13. struct dat{
  14.   int dayr;     /* struct to get the date from the system through dos.h*/
  15.  char damo;
  16.  char dada;
  17.  } da
  18.  
  19. getdate(&da);
  20. printf("%i\n", da.dayr);
  21. printf("%s\n", da.damo);
  22. etc...
  23. I am able to get the year 1992, but when I attempt to print the month and day I
  24. get the Borland copyright info printing on the screen. I am not sure whether or
  25. not this is even the correct way to go about it. I am a novice at C but would j
  26. ust like to deconstuct the entire date into it's component parts and use them.
  27. Thanks in advance
  28.  
  29. Ed
  30.