Gold
Gold

Reputation: 62554

Crystal report + c# date format

I have datetime var that I show him in Crystal report

I whant to see in short format (dd/mm/yyyy) - but I see him in Long (dd/mm/yyy hh:mm:ss)

what can i do ?

Upvotes: 0

Views: 3830

Answers (3)

Khattab
Khattab

Reputation: 737

I use this method to format the date

ToText(Date ({Table.DATEField}),"MM/dd/yyyy")

Upvotes: 0

pvieira
pvieira

Reputation: 1695

You have to format the field in Crystal Reports editor. Right-click the field in design mode, and choose "Format" or something like that.

Upvotes: 2

Dusty
Dusty

Reputation: 4707

You can also use the CStr function to format the date as needed if this is going to be in a formula field. I believe the below would work, but didn't try it to be certain.

Cstr({field}, "dd/MM/yyyy")

Upvotes: 0

Related Questions