Solved

Crystal Report - Chnage date field separators

Posted on 2011-03-16
8
683 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
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
 

Author Comment

by:mbroad02
ID: 35149232
I need specific details and syntax how-to.  thank you
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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 100

Accepted Solution

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

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

mlmcc
0
 
LVL 34

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

746 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now