Crystal Reports

  • Hi

    This is not directly realted to T-SQL but This folder seemed the closest to the subject.

    I'm trying to convert a string for e.g '20030826' into a date value in crystal report so the formatting option is available and also to create formulas using the datevalue.

    Could you help please

    Thanx.

  • Would this be of any help?

    http://www.codecomments.com/archive342-2005-10-638192.html

    (Google to the rescue)

    /Kenneth

  • If the date string has constant length, this will work in crystal

    CDate(ToNumber(Mid('20030826',1,4)),

    ToNumber(Mid('20030826',5,2)),

    ToNumber(Mid('20030826',7,2)))

    or on the sql side:

    cast('20030826' as datetime) and then pass it to crystal

  • It is always better to do coversion on SQL side and take a simple report using Crystal Report

    V.Kadal Amutham

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply