Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: convert date to string Post Reply Post New Topic
Author Message
botete
Newbie
Newbie
Avatar

Joined: 16 Sep 2007
Location: United States
Online Status: Offline
Posts: 15
Quote botete Replybullet Topic: convert date to string
    Posted: 09 Nov 2007 at 11:19pm
Hi and Good day;
 
Im creating a formula field in CR, that consist of a date and text, I searched the Function and even Operator tabs, but can't seem to find, everytime I try to save it says that there's an error in formula.
 
my date looks like this... yyyy-mm-dd
 
and I'd like to add a text before the date field but all of them as a single formula field, also I'd like the date to be displayed as mm/dd/yyyy.
 
Please help. Thanks.
 
Bo Smile
IP IP Logged
IdoMillet
Groupie
Groupie


Joined: 26 Oct 2007
Location: United States
Online Status: Offline
Posts: 99
Quote IdoMillet Replybullet Posted: 11 Nov 2007 at 10:51am
Create a formula like this:

"Your Text that comes befor the date " + ToText({your_date_field},"MM/dd/yyyy")

Notice the MM must be upper case.  lower case mm's are for minutes.

- Ido
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
www.MilletSoftware.com
IP IP Logged
botete
Newbie
Newbie
Avatar

Joined: 16 Sep 2007
Location: United States
Online Status: Offline
Posts: 15
Quote botete Replybullet Posted: 12 Nov 2007 at 6:45pm
Sir, seems that the syntax is ok, there's no error anymore when I saved the formula. Thanks Ido.
 
Bo Smile
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.039 seconds.