L
lasek
Hi all,
Someone can help me ?
Someone can help me ?
Code:
char compete[FIELD_LENGTH]; //20 char
compete contain a 'date value' returned from oracle procedure (Pro*C)and
you can imagine his value, for example,"01/01/2005"
After i call
strcpy(compete,FormattaData(compete,"%Y%m"));
Now compete value is "2005-01-01"
char *FormattaData(char*datak, char *format)
{
static struct tm *tm;
static char buf[20];
char messaggio[200];
char messtail[100];
memset(buf,'\0',sizeof(buf));
if((tm = getdate(datak))== NULL)
{
CreaPattern(messaggio);
sprintf(messtail," Forse manca la stringa di decodifica in
getdate.template %s \n",datak);
strcat(messaggio,messtail);
ScriviLogFile(messaggio,0);
sprintf(buf,"");
}
else
{
strftime(buf,sizeof(buf),format,tm);
}
buf[19] = '\0';
return buf;
}
I don't wont to use getdate() because this function get info from a
template used to parse and interpret the input string. The templates are
contained in a text file identified by the environment variable DATEMSK,
and my
application run very slowly each time i call her
Someone can help me ?
Thanks a lot..