Hi Stephen

I don't know if anyone gave you this idea - first, timestamp_format will work fine with this - i'm using a constant, but for the Julian date -

timestamp_format('2021025', 'YYYYDDD')

gives you '2021-01-25-00.00.00.000000' for the timestamp value. At least, it did this correctly on our 7.3 box.

If you need the date only, wrap timestamp_format() with date().

Now your JDE value is CMMDDD, right? How about adding 1900000 to that and using the digits function?

timestamp_format(digits(CMMDDD + 1900000), 'YYYYDDD')?

As I type that, I think I saw something like this in another post. Apologies if it has already been suggested.

Cheers
Vern

YYYYMMAA or DDMMYYYY to Julian YYYYDDDD) for that I recommend invoking
(Call) the program X0028, which has the function of convert from Gregorian Date
to Julian and vice versa, once the date has been converted you will have the parameters
with the date in the appropriate format (YYYYDDDD) to be used in any embedded SQL
or as you should use it Best Regards
Sergio -

Thanks for your comments.

I have been working with JDE for almost 40 years, so I am very familiar with all of the JDE callable routines for validating and manipulating data. In this case, my interest is in SQL scripts or SQL queries against the JDE files, and I need the simplest way to query JDE and compare jde date fields OUTSIDE of the JDE software.

Alan's iDate UDF is perfect for that!

Regards,
Steve Landess
512-289-0387


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.