delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/12/23:15:31

From: pneyz <pneyz AT bethany DOT edu>
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
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>    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/
*/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019