Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Add Spaces in date Field Post Reply Post New Topic
Author Message
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Topic: Add Spaces in date Field
    Posted: 17 Apr 2012 at 10:12am
I need to add spaces in a date field between each number.

I need it to look like this

Y Y Y Y M M D D

Currently it looks like

YYYYMMDD


I have tried to use the Spacing Character Spacing Exactly and set that to 2.  Maybe I have to to set it to a larger #?  Any other ideas?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Apr 2012 at 10:47am
maybe picture?
picture(field,'x x x x x x x x')
IP IP Logged
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Posted: 20 Apr 2012 at 1:13am
This is how I got it to work!

totext({AP_CheckWrk.CheckDate}, "yyyyMMdd")


mid({@Date to text},1,1)&" "&mid({@Date to text},2,1)&" "&mid({@Date to text},3,1)&" "&mid({@Date to text},4,1)&" "&mid({@Date to text},5,1)&" "&mid({@Date to text},6,1)&" "&mid({@Date to text},7,1)&" "&mid({@Date to text},8,1)
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Apr 2012 at 7:20am
glad you got a solution. I incorrectly assumed it was already a text field. Picture only works with strings. For future options you could convert to text as you did and use the pciture on that. A little easier than inserting the " ".
picture(totext({AP_CheckWrk.CheckDate}, "yyyyMMdd"),"x x x x x x x x")
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.