Date Problem during Data Conversion

henrycuyos

Member
Hi guys,

We're on Oneworld/xe S.P. 18 Rev. 4. HP/UX

I'm trying to convert journals from a legacy system into OW using Amtrix as the integration tool. The theory is that Amtrix uses the std. OW Apis' to insert records into the F0911Z1 table.

Everything seems to work ok aside from the date fields, DGJ, in particular. I turned jdedebug on which shows me the actual insert command line to the database. The fields/attributes values are what i expected them to be aside from DGJ.

I've tried julian dates, with and without quotes, dd/mm/yy, mm/dd/yy, mm/dd/yyyy formats with and without quotes, but all it's showing on the insert line for the date field is NULL DATA.

Anyone else out there encountered this before?


Regards

Henry
BBWE
Australia
 
Henry,

your best guest to convert the date by using API's to a OneWorld Format will probably be this API's:

DeformatDate
====================

DeformatDate changes a date string into the JDEDATE format.

Syntax

Short DeformatDate (JDEDATE FAR * lpjdDateOut, char FAR * lpszDateString, char FAR * lpszFormatMask);


Parameters
=============================================
lpjdDateOut
Pointer to JDEDATE variable to format.

lpszDateString
Date string.

lpszFormatMask
Mask indicating format of date input string.

===================================================================
Example

JDEDATE jdDateOne;

char szDateOne[ ] = “03/10/1994\n”;

char szFormatMask[ ] = “OSASE”;

rc = DeformatDate (&jdDateOne, szDateOne, szFormatMask);

===================================================================

The Mask is from this list :

Mask Description
D Day Number, 1 or 2 digits.
A Day Number, ZERO pad to 2 digits.
Y Day Number, space pad to 2 digits.
M Month Number, 1 or 2 digits.
O Month Number, ZERO pad to 2 digits.
N Month Number, space pad to 2 digits.
T Month Number, by language, from UDC.
B Abbreviated Month Name, by language, from UDC.
R 2 Digit Year.
E 4 Digit Year.
S Date slash character, from configuration.
C Date comma character, from configuration.

====================================================================

Tell me if this help you

For the other JDEList member who are interested in using this but inside OneWorld, there is already a Business Function doing the job for you. The BSFN is B74I0010 Convert String Date to Date Format Mask

Christian Audet

*** SHARED KNOWLEDGE = BETTER KNOWLEDGE ***

Implementing B7333 (Xe) SP16.1, SQL
(Support B732, B7331 and B7332)
 
Back
Top