Convert date to JDE Julian

jimjung27

Active Member
I am exporting a date field from V9.0 to V8.9 F0911Z1. First, I thought of formatting the date fields as mm/dd/yy to make the import easier but haven't been able to use B0800013 (ConvertStringToDate) or B0800208 (ConvertStringDateToDateFormat) successfully. I receive a null date in both cases. For the latter, I tried using a szFormatMask of MDY and MDE.

Appreciate any suggestions for this field transfer?
 
Why don't you try ConvertStringToDateUsingMask (B74I0010). The Business Function Notes will explain the mask you need to use (in your case "OSASR").

It worked fine for me.
 
I have always used them without any issues not sure why its not working for you. This function are used in many std. program why dont you look into and check?

Chan
 
Thank you. I will keep on trying different formats. I thought it would be easy, too. I am just taking a string value and want to insert this into a JDE Date Field. What is the easiest way?
 
Yes. Good idea. I will check the Xref P980011 and take a look at another UBE and copy how it is used.
 
I had an issue yesterday with B)800208, but it was because the order of the format mask was incorrect. I believe it needs to be in the order of the values. Click on business function notes to determine which code and order to use for the format mask.

i.e. 04132012 => OAE is the function mask.
 
I'm using the UDC Table 00-DF for the Date Format codes, the most common I'm guessing is MDY. For this, the value 030112 is Mar 12, 2012. Doesn't seem to work for me yet.

There are alot of posts on how to extract and format dates but none that I can find on how to put a date into JDE.
 
The part I don't get is if you are moving data from one version of E1 to another why do you need to convert the date? A table conversion should handle that just fine.

Anyways, here is a link that talks about converting a string to a date and explains how the format code works. This should help you convert the date string without any issues.
 
Thanks for all the suggestions and comments. I finally did the conversion, and yes, Table Conversion would've been nice, but the Director here wanted it to be written this way. This is a fairly complex environment with a number of Old/New/Borrowed instances where this code may end up.

The final version was mm/dd/yyyy with the mm and dd padded with leading zero. This works fine with the BSFN functions that convert string to JDE date.

Thanks for all who commented in the discussion. Always helps to know there's people out there.
 
Back
Top