• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 734
  • Last Modified:

Crystal Report - Chnage date field separators

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
mbroad02
Asked:
mbroad02
1 Solution
 
LeDaoukCommented:
fomat field -> custum style: customise : Date Tab and change seperators
0
 
mbroad02Author Commented:
Sorry but that won't work as this is a TEXT field containing this date.  that's what I meant by STRING field.
0
 
LeDaoukCommented:
so make a formula and use the functions right and left to manage this issue
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
mbroad02Author Commented:
I need specific details and syntax how-to.  thank you
0
 
LeDaoukCommented:
create a formula:
left(x,2) +"/" + Mid (x, 2,2 )Right (x,2 )
where x is the value you are managing
0
 
mlmccCommented:
Try this

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

mlmcc
0
 
James0628Commented:
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
 
mbroad02Author Commented:
Simple and effective.  thank you
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now