Hi,
With the following program I amgetting date and time in a buffer.
#include <time.h>
#include <stdio.h>
void main(void)
{
char datebuf[9];
char timebuf[9];
_strdate(datebuf);
_strtime(timebuf);
printf("Date: %s Time: %s\n",datebuf,timebuf);
}
The date and time are in this format mm/dd/yy & HH:MM:SS
But I am to format the above date and time and I want it to be mmdd and HHMM
so the datebuf = mmdd
timebuf = hhmm
how do i do this in C.
Thanks in advance
Sridhar
With the following program I amgetting date and time in a buffer.
#include <time.h>
#include <stdio.h>
void main(void)
{
char datebuf[9];
char timebuf[9];
_strdate(datebuf);
_strtime(timebuf);
printf("Date: %s Time: %s\n",datebuf,timebuf);
}
The date and time are in this format mm/dd/yy & HH:MM:SS
But I am to format the above date and time and I want it to be mmdd and HHMM
so the datebuf = mmdd
timebuf = hhmm
how do i do this in C.
Thanks in advance
Sridhar