Re: Xe - 8 pos date to 6 pos jde date

Frosty the Coder

Legendary Poster
Re: Xe - 8 pos date to 6 pos jde date

I've not had the pleasure of playing in XE, but I found
these in 733

B0800013 - Convert date to string

jdWork_UPMJ <- JDDateConvertedDate
szMMDDYY -> szStringToConvert

I also have notes on a call to help desk where they suggested

B41B0470 - Format Date from DMY

mnYY_MATH01 -> mnYear
mnMM_MATH01 -> mnMonth
mnDD_MATH01 -> mnDay
jdWork_UPMJ <- jdDate

Both would require that you substring your input date to remove
the delimeters. The second would also require that you
Convert String to Math Numeric (B0000580).

I'd be _thrilled_ to find something like the X0028 date routines
from World.




Gene Piekarski, Jr

AS/400, B733, SP11.2, NT client
 

Sunil

Member
Re: Xe - 8 pos date to 6 pos jde date

Hi gpiekarski

You can BSFN B0800208 which converts date string into JDE Date.

e.g in C language.

strncpy( zDS0800208.szStringToConvert , dsFetchFromTape.q0diss, (sizeof(zDS0800208.szStringToConvert ) -1 ));
strncpy( zDS0800208.szFormatMask , "ROA", sizeof( zDS0800208.szFormatMask ) );

for Date String in DDMMYYYY
use Format Mask as AOE. the Definition of the Format Mask is available in Published API's

jdeCallObject ( "ConvertStringDateToDateFormat", (LPFNBHVR)NULL lpBhvrCom, lpVoid, &zDS0800208,(CALLMAP*)NULL,0,(char*)NULL, (char*)NULL, 0 );

memcpy((void *)(&jdDate),(const void *)&zDS0800208.jdConvertedDate),sizeof(JDEDATE));

The above source can easily converted to ER's by calling BSFN B0800208 and passing the appropriate parameters of Input String Date, Date Format Mask and Output JDE Date.

Sunil
 
Top