?
Solved

Crystal Report - Chnage date field separators

Posted on 2011-03-16
8
Medium Priority
?
712 Views
Last Modified: 2012-05-11
Hopefully this is an easy question.  I have a string field which contains a date field.  The date is formatted as MM-DD-YY and I wish to change that to MM/DD/YY.  How can I do this?
thanks
0
Comment
Question by:mbroad02
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 4

Expert Comment

by:LeDaouk
ID: 35149016
fomat field -> custum style: customise : Date Tab and change seperators
0
 

Author Comment

by:mbroad02
ID: 35149128
Sorry but that won't work as this is a TEXT field containing this date.  that's what I meant by STRING field.
0
 
LVL 4

Expert Comment

by:LeDaouk
ID: 35149218
so make a formula and use the functions right and left to manage this issue
0
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 

Author Comment

by:mbroad02
ID: 35149232
I need specific details and syntax how-to.  thank you
0
 
LVL 4

Expert Comment

by:LeDaouk
ID: 35149268
create a formula:
left(x,2) +"/" + Mid (x, 2,2 )Right (x,2 )
where x is the value you are managing
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 35149655
Try this

Replace({DateFieldString},'-','/')

mlmcc
0
 
LVL 35

Expert Comment

by:James0628
ID: 35154742
If this is related to your previous question about pulling the dates out of a string and reformatting them (and assuming that you don't need the dates in both MM/DD/YY _and_ MM-DD-YY format), then you could just replace the "-"s in your formula with "/"s.  For example, change

          displayField3 := DateParts[1] & '-' & DateParts[2] & '-' & Right(DateParts[3],2)
  to
          displayField3 := DateParts[1] & '/' & DateParts[2] & '/' & Right(DateParts[3],2)


 James
0
 

Author Closing Comment

by:mbroad02
ID: 35215226
Simple and effective.  thank you
0

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question