Skip to Content
author's profile photo Former Member
Former Member

Date Conversion

Hi

I am using below formula for report heading

"Analysis Data "&"("&{?ef}&"-"&{?et}&")"

The o/p is Analysis Data(1/1/2007 -12/31/2008)

but i want to dispaly like Analysis Data(1-Mar-07 - 12-Dec-08)

How to convert the dates in formula/

Thank you

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 09:37 AM

    Hi

    Thanks for your response

    I used this formula

    "Analysis Data"&"(" &DatePart("d",{?ef})&"-"&MonthName(DatePart("m",{?ef}))&"-"&DatePart("yyyy",{?ef})&"-"

    &DatePart("d",{?et})&"-"&MonthName(DatePart("m",{?et}))&"-"&DatePart("yyyy",{?et})&")"

    so i am getting o/p like

    Analysis Data ( 1 . 00 - January - 2 , 007 . 00 - 31 . 00 - December - 2 , 008 . 00 )

    but i want Analysis Data ( 1-jan-07 -31-dec-08)

    means date should be 1 rather than 1.00

    month should be jan rather than january

    year shouls be 07 ratherthan 2,007.00

    Thank you

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 22, 2008 at 08:45 AM

    Instead of conversion function you can use following formula for date diff

    Local DateTimeVar d1 := {Customer_Payment.Date1};

    Local DateTimeVar d2 := {Customer_Payment.Date2};

    DateDiff ("yyyy", d1, d2) ;

    let me know if it solves your problem

    -- Kuldeep

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 08:57 AM

    Hi

    I don't want to show the difference between dates.

    i want to attached the dates to report heading.

    i want show dates but in different format.

    i want to change date format from 1/1/2007 to 1-mar-07.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 22, 2008 at 08:59 AM

    To get the date in your format use following formula

    DatePart("d",CurrentDate)&"-"&MonthName(DatePart("m",CurrentDate))&"-"&DatePart("yyyy",CurrentDate);

    --Kuldeep

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 10:20 AM

    Hi

    Thanks, My problem is solved.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.