Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Specific date format in Crystal 2008 Post Reply Post New Topic
Author Message
Gizmo
Newbie
Newbie
Avatar

Joined: 24 Jun 2011
Online Status: Offline
Posts: 3
Quote Gizmo Replybullet Topic: Specific date format in Crystal 2008
     Posted: 24 Jun 2011 at 10:24am
Hi
 
I need some assistance please.
I import data from CSV into a SQL database.
Example of the date format in the table - 07/12/2010.
When I view this date field in Crystal reports, it shows as 12/07/2010.
 
Could someone help me with the formula to force that the data shows as DD/MM/YYYY please?
 
Regards
 
Gizmo
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 24 Jun 2011 at 10:46am
idk if you tried right click on that field in crystal -> format field-> date time (tab)-> customize -> date (tab) -> order (select order needed) 
IP IP Logged
Gizmo
Newbie
Newbie
Avatar

Joined: 24 Jun 2011
Online Status: Offline
Posts: 3
Quote Gizmo Replybullet Posted: 24 Jun 2011 at 11:32am
I have tried that but it messes the other dates up. Example of this will be a entry which used to show as '15/08/2010' and now show as '08/15/2010'. I also need to mention that I converted a varchar to a date field using CDATE.
IP IP Logged
klyounus
Newbie
Newbie
Avatar

Joined: 24 Jun 2011
Location: India
Online Status: Offline
Posts: 3
Quote klyounus Replybullet Posted: 25 Jun 2011 at 2:37am
check your .csv file date format.  and recheck it when u export it in sql database.  if you have exported it in correct format it will give u the correct result in crystal report. 
IP IP Logged
Gizmo
Newbie
Newbie
Avatar

Joined: 24 Jun 2011
Online Status: Offline
Posts: 3
Quote Gizmo Replybullet Posted: 25 Jun 2011 at 6:51am
Hi
 
It imports correctly from CSV into SQL.
The field is a string, so I convert it to a date using CDATE.
What happens though is that the day and the month gets swopped around.
Is there a way that I can ensure that I get the DD/MM/YYYY format?
 
Help please.
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