Crystal Reports convert date

I have a system that uses a modified julian date lot number sequence.  Ex.  B011601  In this example the 0 in the second position represents the year and the 116 represents the julian day of the year.

What I need to do is get the correct syntax to convert this number to a MM/DD/YY format.

Thanks in advance.
LVL 3
Trygve ThayerIT DirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

peter57rCommented:
What year does the ' 0 in the second position ' represent?
0
jmyungCommented:
Is the example you have given a random set of numbers.  From my understanding a Modified Julian Date uses 5 digits.  so the last 5 digits (11601) = 08/22/1890
0
Trygve ThayerIT DirectorAuthor Commented:
To peter57r
The last 2 digits represent a numerical sequence on that day.  01, 02, 03, 04 etc.
To imyung
We may not be using a modified julian but am unable to change the combination.
0
mlmccCommented:
What date does B0116 represent?

Is this going to be based off 2010 so the 0 is 2010 and when it is 1 it will be for 2011

Try this formula

Local numberVar NumDays;
Local NumberVar AddYears;

AddYears := Val(Mid({YourString},2,1);
NumDays := Val(Mid({YourString},3,3);

DateAdd('d',NumDays , Date(2010+AddYears ,1,1))

mlmcc
0
Tarakas4Commented:
Use crystal reports functions to:

1. Break down the string- use string functions. Assign this to a variable you define
2. Check for the value and assign to appropriate value
3. Use Date functions to convert the three variables to one date value.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.