Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

number to date - ordering and charting

Status
Not open for further replies.

mart10

MIS
Nov 2, 2007
394
0
0
GB
I am using CR 2016 SP2

The dates in the SQL db I have are stored as numbers I convert as follows:

totext({View_MM_LT_Deals_U_AccountBalances_V3.StartDate} + Date(1979, 12, 31)) tis will show when I format to 20-Feb-18 for instance

I had 2 issues - sorting the data by date AND charting the data by date

1. Sorting by date I resolved by grouping by the date NUMBER and then by group "date" formula - I then supressed the first group and the presentation of raw data looks fine in correct date order

2. Where I am stuck is charting - where the date is the X axis. If I use the date NUMBER then it presents the data in correct order BUT shows the number and not the date format I need. If I present by using the "date" formula then it looks good but it doesnt show in the real date order

 
 http://files.engineering.com/getfile.aspx?folder=1810c1b7-07ec-483a-9751-4397dc25ddfb&file=Doc1.docx
If you leave your date as a date then sort order will be fine.
Remove the Totext() wrapper from your formula.
You can format display of date in Crystal to achieve the format you want as 20-Feb-18 just right click field on designer select date format and then click custom and set as you want.
Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top