home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource4
/
273_01
/
getldate.cc
< prev
next >
Wrap
Text File
|
1988-04-19
|
1KB
|
31 lines
#include <dos.h>
#include <stdio.h>
#include <stdlib.h>
long int get_long_date()
/*
┌────────────────────────────────────────────────────────────────────┐
│Purpose: Get the current date. │
│ │
│ Inputs: None. │
│ │
│Outputs: None. │
│ │
│ Return: A long int containing the current date in the format │
│ YYMMDD. │
└────────────────────────────────────────────────────────────────────┘
*/
{
struct date today;
char mystr[40];
long l_date;
getdate(&today);
sprintf(mystr,"%2.2d%2.2d%2.2d",
today.da_year - 1900,today.da_mon,today.da_day);
l_date = atol(mystr);
return(l_date);
}