Print Page | Close Window

How to do date formatting in crystal report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21962
Printed Date: 28 Apr 2024 at 12:03pm


Topic: How to do date formatting in crystal report
Posted By: Radha
Subject: How to do date formatting in crystal report
Date Posted: 11 May 2016 at 4:43am

I am using crystal report for visual studio 2013 in my windows application (c#). I have to create a chart where x-axis has a date field. My date has time component also so the chart shows something like this 2016-05-09 23:04:04 PM. Can someone please advise

1. How do I format the date so it only shows the date i.e. 09-May-2016 and discard the time part.

2. How to set the date interval i.e. the scale should be 3 days

Thanks






Replies:
Posted By: hilfy
Date Posted: 11 May 2016 at 10:36am
To discard the time part of the datetime field, try using a formula like this instead of the field:

Date({MyTable.DateTimeField})

I have never really worked with charts in Crystal, so I'm not sure how to set the interval.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: kevlray
Date Posted: 11 May 2016 at 10:58am
It goes by the data.  Not sure how to do this one.  Normally it shows a data point for each change in object (field, group).


Posted By: Radha
Date Posted: 11 May 2016 at 6:30pm
I am new to charts and making it first time so don't know how to put formula.


Posted By: Radha
Date Posted: 11 May 2016 at 6:32pm
Sorry it kept giving Server Error so I thought the post has not being posted


Posted By: Radha
Date Posted: 11 May 2016 at 6:33pm
Ok I have created a new formula and added that in the chart but it shows 1-jan-1900 also so how do I remove that?


Posted By: kevlray
Date Posted: 12 May 2016 at 4:13am
It goes back to your formula.  Apparently it is returning that date for some reason.



Print Page | Close Window