Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Data Connectivity
Message Icon Topic: How to do date formatting in crystal report Post Reply Post New Topic
Author Message
Radha
Newbie
Newbie


Joined: 11 Mar 2016
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote Radha Replybullet Topic: How to do date formatting in crystal report
    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



IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet 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
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet 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).
IP IP Logged
Radha
Newbie
Newbie


Joined: 11 Mar 2016
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote Radha Replybullet 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.

Edited by Radha - 11 May 2016 at 6:35pm
IP IP Logged
Radha
Newbie
Newbie


Joined: 11 Mar 2016
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote Radha Replybullet Posted: 11 May 2016 at 6:32pm
Sorry it kept giving Server Error so I thought the post has not being posted

Edited by Radha - 11 May 2016 at 6:35pm
IP IP Logged
Radha
Newbie
Newbie


Joined: 11 Mar 2016
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote Radha Replybullet 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?


Edited by Radha - 11 May 2016 at 8:20pm
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 12 May 2016 at 4:13am
It goes back to your formula.  Apparently it is returning that date for some reason.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.