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