Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date output format Post Reply Post New Topic
Author Message
dutyfree
Newbie
Newbie


Joined: 21 Jul 2008
Online Status: Offline
Posts: 24
Quote dutyfree Replybullet Topic: Date output format
     Posted: 21 Jul 2008 at 3:04am
I'm new to crystal reports. I created a basic reports using a stored proc. I wish to display the date format of a date field which is currently displayed as e.g. 20070521 to 2007/05/21. How can i achieve this?

I tried totext(cdate({mydatevalue}), "yyyy\mm\dd"); but this throws bad synthax error.
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 21 Jul 2008 at 3:28am
Hi use the following formula
 
 
left("20070521",4) + '/' + mid('20070521',5,2)+ '/'+mid('20070521',7)
 
replace the values with ur date field.
 
 
 
cheers
Rahul
IP IP Logged
dutyfree
Newbie
Newbie


Joined: 21 Jul 2008
Online Status: Offline
Posts: 24
Quote dutyfree Replybullet Posted: 21 Jul 2008 at 4:28am
Smile Rahul Thanks for that.
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