Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Anbody used ifx_dttofmtasc() successfully?  (Read 9351 times)
David H.
Posts: 158


« 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
Sebastien F.
Four Js
Posts: 509


« Reply #1 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
David H.
Posts: 158


« Reply #2 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
Sebastien F.
Four Js
Posts: 509


« Reply #3 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
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines