Print Page | Close Window

Date handling in XI

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2227
Printed Date: 03 May 2025 at 8:13pm


Topic: Date handling in XI
Posted By: Eany
Subject: Date handling in XI
Date Posted: 05 Feb 2008 at 5:50am
My rpt access dates from an SP.

When the SP is run interactively,
the dates are returned as Nulls, or YYYY-MM-DD HH:MM:SS.DDD   (e g 2008-01-22 00:00:00.000)

I created a formula :

If isnull({Date})
    Then " "
else
    ToText({Date}, "yyyy-mon-dd")


The ISNULL works OK, but if there is a date,
as above, I get
2008-0on-22, instead of 2008-Jan-22.


-------------
Eany



Replies:
Posted By: rahulwalawalkar
Date Posted: 05 Feb 2008 at 6:36am

Hi

 
use the following
 
ToText({date}, "yyyy-MMM-dd")
 
cheers
Rahul


Posted By: Eany
Date Posted: 05 Feb 2008 at 6:51am
Many thanks Rahul : so obvious !

-------------
Eany



Print Page | Close Window