Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Trimming or separating Post Reply Post New Topic
Author Message
repstronics
Newbie
Newbie


Joined: 31 Aug 2010
Location: Mexico
Online Status: Offline
Posts: 3
Quote repstronics Replybullet Topic: Trimming or separating
     Posted: 31 Aug 2010 at 5:21am
I have a field that has the date and time in the same field something like:
 
20100802 18:11
 
I want to trim or separate thos 2 values and put them on a field on the report how can I do this? it's a string(14)
 
Thanks in advance
Regards
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Aug 2010 at 5:45am
left(Field,8)
right(field,5)
IP IP Logged
repstronics
Newbie
Newbie


Joined: 31 Aug 2010
Location: Mexico
Online Status: Offline
Posts: 3
Quote repstronics Replybullet Posted: 31 Aug 2010 at 5:56am
Do I insert that on the formula on text interpretation or where should I put that?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Aug 2010 at 6:00am

Make 2 different formulas

In the Field Explorer
Right click on the Formula Fields
select New
name it as Date (or whatever you want)
left({table.Field},8)
Repeat but name it "Time"
right({table.Field},5)
 
Replace the {table.Field} with your actual table and field name
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Aug 2010 at 6:01am
you can then drag the formula fields onto the report canvas and use as desired
IP IP Logged
repstronics
Newbie
Newbie


Joined: 31 Aug 2010
Location: Mexico
Online Status: Offline
Posts: 3
Quote repstronics Replybullet Posted: 31 Aug 2010 at 6:05am
Sorry I'm a newbie on this I was able to do it thanks for your help!!!
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