Solved

# Crystal Reports convert date

Posted on 2010-04-07
Medium Priority
482 Views
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.

0
Question by:Trygve Thayer

LVL 77

Expert Comment

ID: 30027719
What year does the ' 0 in the second position ' represent?
0

Expert Comment

ID: 30034867
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

LVL 3

Author Comment

ID: 30049278
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

LVL 101

Expert Comment

ID: 30079503
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

LVL 2

Accepted Solution

Tarakas4 earned 2000 total points
ID: 32336589
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

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
###### Suggested Courses
Course of the Month4 days, 13 hours left to enroll