Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Text field to date field Post Reply Post New Topic
Author Message
dnrwilbl
Newbie
Newbie


Joined: 23 Mar 2009
Location: United States
Online Status: Offline
Posts: 6
Quote dnrwilbl Replybullet Topic: Text field to date field
     Posted: 14 Aug 2009 at 2:17pm
I have a field that represents a date but is entered as text.  Example:  20090814 which is yyyymmdd.  Is there a way to convert this to be a date and displayed as mm/dd/yyyy?  Thanks.
IP IP Logged
Retep
Newbie
Newbie
Avatar

Joined: 15 Aug 2009
Online Status: Offline
Posts: 4
Quote Retep Replybullet Posted: 16 Aug 2009 at 11:47am

I had a similar problem with telephone numbers - when printed they would appear without brackets and with no spaces as 6045385830 instead of (604) 538-5830.

I ran ounto the following solution - I think the source link is at the bottom of the solution.  Hope this helps.
 

On the Field Explorer:
Right Click 'Formula Fields'
Choose 'New'
Create a new formula with this
If the value you are passing is a number use ToText:
Picture(ToText({ORGANIZATION_VW.ORGA_CONTACT_PHONE}),"(xxx)xxx-xxxx")
Save it and then use it. If you see commas and decimals then you need to go to 'File' and then 'Options' then 'Fields', Choose Numbers, then Customize then take out the thousands and make decimal 1 (get it to a number without any commas or decimals) .

It should look right now.

http://www.xtremevbtalk.com/showthread.php?t=142156

Retep
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