puppet
puppet

Reputation: 1

How to change the date format of a parameter in Crystal Reports?

By default Crystal Reports will display dates as 6/1/2011(month/day/year), so I have to change the formatting to 01-06-2011(day/month/year) by using the formula:
ToText({MyDate}, "dd-MM-yyyy").

My question is how do I change the date format when using date parameters?

For example:
This is my date parameter :{?date}
This is my formula (called {@displaydate}) to display the chosen date on the report:
"From : " & Minimum({?date}) & " To :" & Maximum({?date})

In design view:
DATE : {@displaydate} {?date}
In Preview Mode:
DATE : From : 6/1/2011 To : 31/6/2011

Upvotes: 0

Views: 14453

Answers (2)

user2417454
user2417454

Reputation: 11

I am Create Formula In The Crystel Report It Converts the Value of datetime format to date. I use following formula.

CDate ({TRAN_STUDENT_INFO.Adm_Date})

Upvotes: 1

Robert Niestroj
Robert Niestroj

Reputation: 16131

"From : " & ToText(Minimum({?date}), "dd-MM-yyyy") & 
" To :" & ToText(Maximum({?date}), "dd-MM-yyyy")

Upvotes: 3

Related Questions