crystal reports xi formatting field question

I have a field from my table that is a character field, which contains a date, in yyyymmdd format. I would like to read this field, and reformat it so it is in mm/dd/yyyy form. How can I do this and what steps would I need to accomplish this?

Thanks in advance.
LVL 13
Who is Participating?
crgary_txConnect With a Mentor Commented:
There could be more easier ways but try this: Create the following crystal formula:

cdate(left({yourdatefield},4)+','+{yourdatefield}[5 to 6]+','+right({yourdatefield},2))

jppintoConnect With a Mentor Commented:
On Design mode, select the textbox where you've your data and on the Properties-DateOrder select the crMonthDayYear option.

samic400Author Commented:
I need to do this within the report in crystal. wouldn't i have to build some sort of function along with the mid function?
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

The solution I gave you is in Crystal Report. Go to your Cristal Report and on the Textbox where you put the data, change the propertie that I told you.

samic400Author Commented:
I guess I'm not seeing that then.
suresh-infotechConnect With a Mentor Commented:
Create a New formula. give some name. in formula editor, paste the following code.
and change the [fieldname] to your actual field. save it. now u can change the date format.

Date (Left (fieldname,4), Mid(fieldname, 5 , 2), right(fieldname, 2))
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.