|
-
Dec 17th, 2006, 11:45 PM
#1
Thread Starter
Frenzied Member
Formatting a date displayed in a crystal report
Hello
I am using VS 2005 CR 10.
I am using typed datasets to populate a report.
From my database I have 1 field called incidentDate, this is a smallTimeDate datatype.
My reports always displayes the correct date, but is followed by the time which is always 12:00. For example 18/12/2006 12:00 AM.
I don't want to display this time. I have tried setting the DateWindowsDefaultType in the report properties for that field. But this did not work.
Does anyone have any other ideas,
Thanks very much,
Steve
-
Dec 18th, 2006, 12:49 AM
#2
Re: Formatting a date displayed in a crystal report
Right click on the Date and click on the Format and select the date from There.
-
Dec 18th, 2006, 02:29 AM
#3
Thread Starter
Frenzied Member
Re: Formatting a date displayed in a crystal report
Thanks for your answer Shakti, but it didn't work.
I did the right click | format object | I selected the format 12/12/2006 and then clicked ok. But did not work.
I also deleted the field and inserted a new one, and did the same as above, but it always displayes this "12/12/2006 12:00:00 AM".
I want to get rid of this time, its driving me nuts.
Any ideas I would be most grateful.
Steve
-
Dec 18th, 2006, 02:35 AM
#4
Re: Formatting a date displayed in a crystal report
If your variable is date Type then the Format will be work , Other thing you can do that just make a formula and put the variable in the formula and change format there.
-
Dec 18th, 2006, 02:40 AM
#5
Thread Starter
Frenzied Member
Re: Formatting a date displayed in a crystal report
Thanks Shakti,
It did work what you said. I did that before, but I was loading the wrong report. Just released my mistake.
However, I am interested in this formula. Can you give me some sample code on how to write this formula. I would like to learn how to do this.
Many thanks for your help,
Steve
-
Dec 20th, 2006, 05:07 AM
#6
Addicted Member
Re: Formatting a date displayed in a crystal report
i think it would be like this
cdate(left(datetimevar,8)
Thanks and Regards,
Muhammad Abbas
-
Dec 20th, 2006, 09:53 AM
#7
Thread Starter
Frenzied Member
Re: Formatting a date displayed in a crystal report
Thanks,
I will give that a try.
-
Dec 28th, 2006, 05:55 AM
#8
Addicted Member
Re: Formatting a date displayed in a crystal report
IF my syntax has helped u then do rate it and pls mark resolved to this problem.
Thanks and Regards,
Muhammad Abbas
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|