cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports Converting Standard Date to JDE Julian Date

0 Kudos

We need a way to convert a normal standard U.S. date to a JDE (or Julian) date.

What we specifically need is format "MM/DD/YYYY" to "YYDDD", much like this: http://peoplesoft.macek.cc/dateconverter.php

What our client specifically has asked for us a UFL. When searching for it, we found a few sites that have links to an .exe that doesn't go anywhere, like this: https://archive.sap.com/discussions/thread/3262580

The same thread as above has a formula that a) doesn't work correctly (wrong output) and b) doesn't follow the YYDDD format. We'd settle for CYYDDD, which I think is more standard, though not what our client is asking for.

There are also threads like this one that give us custom functions. That would work too, I think, but this is converting the wrong direction, from JDE to standard: https://archive.sap.com/discussions/thread/3309357 - where we need standard to JDE.

Someone please help.

Thanks,

Nathan

Accepted Solutions (0)

Answers (2)

Answers (2)

vitaly_izmaylov
Employee
Employee
0 Kudos
0 Kudos

Hi Vitaly,

I'm getting a compatibility error message when running this .exe: "The version of this file is not compatible with the version of Windows you're running."

OS Name: Microsoft Windows Server 2008 R2 Standard

OS Version: 6.1.7601 Service Pack 1 Build 7601

OS Manufacturer: Microsoft Corporation

OS Configuration: Member Server

OS Build Type: Multiprocessor Free

System Manufacturer: VMware, Inc.

System Model: VMware Virtual Platform

System Type: x64-based PC Processor(s): 4 Processor(s) Installed.

Thanks.

vitaly_izmaylov
Employee
Employee
0 Kudos

I do not have any latest versions for the UFL.

It was developed for old versions of Crystal Reports.

0 Kudos

Any suggestion? Our client says this is an urgent need. They are on version 14.0.2.364 RTM.

Thank you.

DellSC
Active Contributor
0 Kudos

Here's what it would look like in a formula in Crystal syntax:

Right(ToText(year({MyTable.DateField}), 0, ""), 2) + Right("000" + ToText(DateDiff("d", Date(Year({MyTable.DateField})-1, 12, 31), {MyTable.DateField}), 0, ""), 3)

If you need it to be a number instead of a string, use "ToNumber()" with the formula.

The description of the logic is:

Get the number of days between December 31st of the previous year and the date field and pad 0 to the left so that the result is 3 characters wide. Then append that to the last two numbers of the year of the date field.

I haven't really worked with UFLs, but that is the logic you'll need to use to get the format you're looking for.

-Dell

0 Kudos

Hi Dell,

I'm not sure what should go in the {MyTable.DateField} field. I'm doing this for a client, and I don't know much about Crystal syntax, sorry.