From: pneyz Newsgroups: comp.os.msdos.djgpp Subject: Re: Getting date and time Date: Sun, 08 Feb 1998 16:10:21 -0800 Organization: Smoof Team Lines: 15 Message-ID: <34DE496D.4613869B@bethany.edu> References: <6bl7db$bou$2 AT herald DOT Mines DOT EDU> NNTP-Posting-Host: scz-ca17-01.ix.netcom.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk > Say, does anyone know how to exctract the date and time so I can > output it back to the user? > > Something like: > > printf("Today's date is: %s %d, %d\n", getmonth(), getday(), getyear()); Have a look at the gettime() and getdate() functions and I think you'll be fine. Both are in DOS.H. -- /* pneyz / Smoof Team pneyz AT bethany DOT edu "Fine Malt Coding" http://ns.bethany.edu/pneyz/ */