Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Concatenate Fields Post Reply Post New Topic
Author Message
b85michaud
Newbie
Newbie
Avatar

Joined: 04 Jun 2015
Location: United States
Online Status: Offline
Posts: 3
Quote b85michaud Replybullet Topic: Concatenate Fields
     Posted: 19 Jun 2015 at 10:19am
Hi All!
     I'm very new to Crystal Reports and I have two columns that I would like to concatenate together.  Both columns are a combination of date and time i.e. 5/11/2015 12:00:00AM.  I want to create just a simple date range (no time) from this i.e. 5/11/2015-5/20/2015. 
     I can't seem to figure out how to remove the time portion of the column.  I thought a left or right trim, but I'm not able to make that work out. 

Any advice would be appreciated! Star
Thank you!
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 22 Jun 2015 at 4:31am
do a totext on both of the fields (looks like you want a format of M/d/yyyy). and then do something like this.

totext({firstdate},"M/d/yyyy")+"-"+totext({seconddate},"M/d/yyyy")
IP IP Logged
b85michaud
Newbie
Newbie
Avatar

Joined: 04 Jun 2015
Location: United States
Online Status: Offline
Posts: 3
Quote b85michaud Replybullet Posted: 22 Jun 2015 at 4:41am
Wow!  That worked perfectly!  Thank you very much! 
IP IP Logged
Printable version Printable version

Forum Jump
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