# 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.

LVL 3
###### 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.

Commented:
What year does the ' 0 in the second position ' represent?
0
Commented:
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
IT 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
Commented:
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;

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

mlmcc
0
Commented:
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