Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: David H. on September 07, 2009, 01:44:17 pm



Title: Anbody used ifx_dttofmtasc() successfully?
Post by: David H. on September 07, 2009, 01:44:17 pm
Hi All,

I'm using v2.11 on Windows and am having some trouble getting ifx_dttofmtasc() to work as expected. It does something and I get no errors, but:-

CURRENT YEAR TO SECOND formatted with %H:%M:%S gives me 00:00:00 and no errors.
CURRENT formatted with %Y-%m-%d %H:%M:%S gives me 0000-00-00 00:00:00 and no errors.

Whatever I pass in seems to get expanded as zero's. I'm calling via a runner function. I'm sure my format string is ok, but either I'm passing the DATETIME from 4GL to C incorrectly (using popdtime) or this function is faulty...

Any ideas anyone?

Regards,

David


Title: Re: Anbody used ifx_dttofmtasc() successfully?
Post by: Sebastien F. on September 07, 2009, 02:21:20 pm
David,

This function is QA tested and should work with the format strings you are using.

Could you please dump the content of your datetime structure?

Seb


Title: Re: Anbody used ifx_dttofmtasc() successfully?
Post by: David H. on September 07, 2009, 04:15:11 pm
Hi Seb,

I never used popdtime() before... Your documentation confused me as it defined:-

void popdtime(dtime_t *dst, int size);

But I did a web search and found some non 4js documentation as:-

void popdtime(dtime_t *dst, int qual);

I'd interpreted size as size dtime_t, certainly not the size of the qualifier! I actually don't see what the 2nd argument is there for anyway... Isn't the datetimes qualifier stored in the dtime_t structure already, i.e. dtime_t.dt_qual?

Anyways when I set the 2nd argument to a valid qualifier (YEAR TO FRACTION) then my function works as expected.

Cheers,

David


Title: Re: Anbody used ifx_dttofmtasc() successfully?
Post by: Sebastien F. on September 07, 2009, 05:22:49 pm
David,

The documentation needs some clarification about this "size" argument, will be fixed.

Sorry for that.
Seb