Trygve Thayer
asked on
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.
What I need to do is get the correct syntax to convert this number to a MM/DD/YY format.
Thanks in advance.
What year does the ' 0 in the second position ' represent?
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
ASKER
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.
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.
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.