Navigation:  The Buzz > Printing > Crystal Reports >

Date Format in Crystal Reports

Previous pageReturn to chapter overviewNext page

Dec 26, 2007 Button

Hi Friends,

 

Please help me -

 

I am using Magic9.4 and Crystal 8.5. In crystal all the date format is showing String format. I am trying to convert by

 

   "Date(1,1,1)+tonumber(fieldname)+1"

 

it is showing the error message "THE NUMBER OF DAYS IS OUT OF RANGE"

 

How I can resolve the problem.

 

Thanks & regards,

Chiranjit      

 

Chiranjit,

 

As what storage type does eDeveloper store this Date column?

 

In eDeveloper, look at the column's property sheet and note the Stored as property. Is it Integer Date? String Date? YYMD Date?

 

If it's stored as Integer Date, then the formula is:

 

   Date(1,1,1) + fieldname - 1

 

If it's stored as String Date, then the formula is:

 

   Date(ToNumber(Left(fieldname,4)), ToNumber(Mid(fieldname,5,2)), ToNumber(Right(fieldname,7,2)))

 

I'm a little rusty on my Crystal Reports syntax, but I think that's it.

 

Steve Blank

 

 

Thanks a lot Steve.

 

Regards,

Chiranjit

 

 


Page url: http://www.magic-iug.com/MIUGWeb3/index.html?hm_date_format_in_crystal.htm