Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Date field formatting Post Reply Post New Topic
Author Message
DougB
Newbie
Newbie


Joined: 12 May 2010
Online Status: Offline
Posts: 2
Quote DougB Replybullet Topic: Date field formatting
     Posted: 12 May 2010 at 8:41am
I am working with someone who upgraded from Crystal 8.5 to 9.0 recently.  On one of their reports, there is a date field that is being converted to display as a "$" field format, but it should be displaying as either mmddyyyy or yyyymmdd.  What is the correct way to edit this field in Crystal 9.0, so that it will display as a date and not as a "$" field ?   

 

Doug B.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 May 2010 at 9:11am
what is the actual field type once it is in crystal?
Is it a string that looks like currency, numeric, currency or something else?
Do you want to convert it to a date or just display it as a date?
What are some sample values?


Edited by DBlank - 12 May 2010 at 9:11am
IP IP Logged
DougB
Newbie
Newbie


Joined: 12 May 2010
Online Status: Offline
Posts: 2
Quote DougB Replybullet Posted: 13 May 2010 at 12:55pm

Hi.  The data is being extracted from an AS400 iSeries, and the date field is numeric, and stored as yyyymmdd.  We are expecting this field to display on the Crystal 9.0 report in the exact same format, 20091001.  But it is diplaying as 20,091,001.00   Thanks for your help.

 
 
Doug B.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 14 May 2010 at 4:53am
Two ways, format that field so that commas and no decimals are displayed (a couple of ways of doing it).  Or convert the field to a text field (in a formula).  ToText({field}, 0).
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 May 2010 at 6:02am
If it is just an issue of display you can also
right click on the number field
select Format Field
seelct the Number Tab
seelct the -1123 option the style list
make sure the 'Display Currancy Symbol' option is False
Select OK
IP IP Logged
delstar
Newbie
Newbie


Joined: 11 Jun 2009
Online Status: Offline
Posts: 26
Quote delstar Replybullet Posted: 17 May 2010 at 8:44am
If you want, I have a handy function for converting AS/400 datetimes to CR datetimes:

Function (numberVar InDate)

Date ( Val ( ToText (InDate,0,"") [1 to 4]),
           Val (ToText (InDate,0,"") [5 to 6]),
           Val (ToText (InDate,0,"") [7 to 8]))
IP IP Logged
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