Crystalkeen logo; we offer Crystal reports viewers and schedulers
 
Crystalkeen header image 3
Crystalkeen header image 5

Crystal Reports Tools: Improve Performance While Saving Time and Money

  Resources  

Articles:
Administration
Advanced
Basic
Database
Financial

Tools:

Analyzers
CR Schedulers
CR UFLs
CR Viewers
DataBase Tools
Graphics
International
Mail UFLs



 
 

Add'l:
About us

Contact Us
 

CrystalReports
on Steroids

Crystal Reports: Date Conversion

Even with Y2K problems now a distant memory, we still find databases that store dates in various formats. If you can identify the rules that the format uses, you can usually design a formula to convert the field to a date so you can perform date calculations. 

One of the formats we were asked to convert was a date that was stored in a string field as ddMMMyyyy (for example 10 of January was stored as 10JAN2003). This field can be converted to a date and used in calculations.

The formula you need is 
Cdate (Picture({table.field},”xx-xxx-xxxx”) 

The Picture function isn’t widely used, but it can be useful in this case to add the required punctuation to the string. CDate is a powerful function that can take a string value that looks like a date and convert it to a date value. 

Just be careful if you have D-M-Y or M-D-Y numeric formats as these could cause some confusion (01-10-2003 is January for a US reader, but October for the rest of the world).

What's that all about, anyhow? Well....

Read more on this issue.



This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd. It may be freely copied and distributed as long as the original copyright is displayed and no modifications are made to this material. Extracts are permitted. The names Crystal Reports and Seagate Info are trademarks owned by Business Objects.

 

 

  • Questions? Please write to mark@crystalkeen.com. We do want your business.
  • Do you have your own tips for Crystal Reports administrators and designers? Write to mark@crystalkeen.com and we'll post your tips with a link to your Website (or with some other attribution if you choose).
  • Crystal Reports is a subsidiary of Business Objects, which is owned by SAP.