|
From: LETCHUMANAN S. <arl...@ya...> - 2005-04-25 01:04:01
|
Dear all,
Is it possible for me to copy current time. I have a problem on this.... Can some one please help me. My coding as below:-
char * ctime(const time_t *timer);
struct record {
char pass[10],name[15],ptname[30],ptnum[30],cust,time,utl_1;
float pqty,gweight,nweight,thick,width,pitch,density,raw,fin, //variable used
mtused,in,out,xpqty,lossa,lossb,lost,start,stop,hour,utl;
} data;
void addData () {
time_t *timer;
timer = malloc(sizeof(time_t));
*timer = time(NULL); //return system time
strncpy(data.time,ctime(timer));
printf("DATE/TIME : %s", data.time);
printf("-------------------------------------\n");
}
Thank you,
Letchu.....
Yahoo! Mobile
- Download the latest ringtones, games, and more! |