Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Report Design
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Report Design
Topic: Strip charcters in middle of string
Author
Message
TorLang
Groupie
Joined: 13 Jun 2012
Location: United States
Online Status: Offline
Posts: 50
Topic: Strip charcters in middle of string
Posted: 09 Sep 2013 at 6:31am
Here is a quick question:
How do i stip charaters in the middle of a filed, or and position, for that matter? Example: 08/01/2013
I need the 20 stripped to look like 08/01/13
I know I know, but I need to keep it a string.
I've done it before, but just can't recall how I did this.....
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 09 Sep 2013 at 6:45am
you can use a replace
replace(field,"20","")
you can convert to a date and back to text
totext(cdate(field),"MM/dd/yy")
you can concantenate
left(field,6)&right(field,2)
IP Logged
TorLang
Groupie
Joined: 13 Jun 2012
Location: United States
Online Status: Offline
Posts: 50
Posted: 09 Sep 2013 at 6:50am
Mr. Blank. I'm gonna have to start sending you free meal tickets. Thanks a bunch.
Using totext(cdate(field),"MM/dd/yy") on the stringvar in question works good. But thanks for giving me "only" 3 options :-)
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
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
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
KONACAD
© 2004-2026 Brian Bischof. All Rights Reserved.