delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/29/07:01:24

From: fixallpcs AT aol DOT com (FixAllPCs)
Newsgroups: comp.os.msdos.djgpp
Subject: A little help with the date & time
Lines: 13
NNTP-Posting-Host: ladder05.news.aol.com
X-Admin: news AT aol DOT com
Date: 28 Jun 1999 21:43:01 GMT
Organization: AOL http://www.aol.com
Message-ID: <19990628174301.22728.00000954@ng-ch1.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Could someone show me an example of date and time coding please?  Something
like:

The date is: mm/dd/yyyy
The time is: hh:mm:ss.hh

I looked in <dos.h> and saw the date struct and ftime structs, but I got a
parse error before the '.' when I tried to compile the line:
cout<<"Date is: "<<date.da_mon<<"/"<<date.da_day<<"/"<<date.da_year<<endl;

Thanks in advance.

Tom Beauchamp

- Raw text -


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