Results 1 to 8 of 8

Thread: Formatting a date displayed in a crystal report

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    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
    steve

  2. #2
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Thumbs up 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.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    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
    steve

  4. #4
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Thumbs up 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.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    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
    steve

  6. #6
    Addicted Member mabbas110's Avatar
    Join Date
    Oct 2005
    Location
    Karachi , Pakistan
    Posts
    172

    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

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    Re: Formatting a date displayed in a crystal report

    Thanks,

    I will give that a try.
    steve

  8. #8
    Addicted Member mabbas110's Avatar
    Join Date
    Oct 2005
    Location
    Karachi , Pakistan
    Posts
    172

    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
  •  



Click Here to Expand Forum to Full Width