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

Date format

Hi Friends,

I have a requirement to create a report which outputs the Webi reports avg run time. For this am using Audit universe which is recording all the reports executed. I have an issue here one of the field is Event date stamp, this is showing the date as ex: May 9 2015.

I want to convert May 9 2015 to 09/05/2015. based on the suggestion in forums,I tried using fromatdate function and also tried other functions but im not able to display as 09/05/2015.

Can someone please suggest me how to achieve my desired result?.

Thanks in advance.

Regards

BN

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 02, 2015 at 08:19 PM

    Kumar,

    Its better to convert the date format in IDT.

    However you can try the following formula, this works for me.

    =FormatDate([Event TimeStamp];"MM/dd/yyyy")

    Thanks,

    Haseeb

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 03, 2015 at 06:01 AM

    Hi,

    Use below formula.


    = ToDate([Event Date Stamp];"mmm dd yyyy")

    Thanks,

    Tanveer.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 03, 2015 at 07:05 AM

    =FormatDate(ToDate([Event Date Stamp];"Mmm d yyy");"dd/MM/yyyy")

    That will give it you as a character string in the format that you want.

    If you want it as a date, use =ToDate([Event Date Stamp];"Mmm d yyy") and then change the format of the date. You may need to use a custom date format of dd/MM/yyyy if it is not available.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Kumar,

      I assume that you use the standard Auditing universe that you may have downloaded from SCN. In that case the below formula would work for you to convert the Event Timestamp to a Date object

      =ToDate(Trim([Event TimeStamp]);"Mmm d yyyy h:mma")

      And you can apply FormatDate or use Cell Formatting to get dd/MM/yyyy.

      Or

      =FormatDate(ToDate(Trim([Event TimeStamp]);"Mmm d yyyy h:mma");"dd/MM/yyyy")

      Regards

      Mohan

  • author's profile photo Former Member
    Former Member
    Posted on Jun 04, 2015 at 05:20 AM

    hi,

    Try this two formula

    =FormatDate(ToDate([date];"Mmmm dd yyyy hh:mm:ss A");"dd/MM/yyyy")

    =FormatDate(ToDate([date];"Mmm dd yyyy hh:mm:ss A");"dd/MM/yyyy")

    -Raju Kushwaha

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2015 at 06:47 AM

    Hi All,

    I am also facing the same issue. I have variable created to pass date-time prompt value using UserResponse function.

    Prompt value date format : 9/1/2015 12:00:00 AM (1st Sept'2015)

    Desired Format:

    2015/09/01 (yyyy/mm/dd )

    Whenever i use ToDate function then it is giving #ERROR and use FormatDate() function giving me 'Expression or sub-expression at position 12 in FormatDate function using invalid data type"

    Can anyone suggest the solution to this issue?

    Regards,

    Venkatesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 13, 2016 at 09:19 AM

    Hello,

    I know it is an old post, but still my solution can still help people.

    The problem is that in web intelligence the abbreviation of the month of April is "apr." and for event date stamp thi is "apr", so the dot is missing.

    You can easily use the formula ToDate for the month of "may" (because there is no abbreviation for may) but for april you have to create a formula in wich you will replace "apr" by "apr." in the event date stamp field.

    Here is the formula, you need to take into account, the fact that :

    - Some months do not have any abbreviation

    - Some months have an abbreviation with 3 letters

    - Some months have an abbreviation with 4 letters

    I am french so the months are in french, you need to translate them in english (please see below)

    FORMULA IN ENGLISH

    =FormatDate(ToDate(Trim

    (

    If Trim(Left([Event DateStamp];4)) InList ("mars";"mai";"juin";"août")

    Then Trim( Left([Event DateStamp];12) )

    Else If Left([Event DateStamp];3) InList ("avr";"oct";"nov";"déc")

    Then Trim (Left([Event DateStamp];3) +". "+Substr([Event DateStamp];4;9) )

    Else If Left([Event DateStamp];4) InList ("janv";"févr";"juil";"sept")

    Then Trim (Left([Event DateStamp];4) +". "+Substr([Event DateStamp];5;8) )

    );"mmm dd yyyy");"dd/MM/yyyy")

    MONTHS

    English: full name of the month in french (abbreviation in french)

    January : Janvier (janv.)

    February: Février (févr.)

    March: Mars (mars)

    April: Avril (avr.)

    May : Mai (mai)

    June: Juin (juin)

    July: Juillet (juil.)

    August: Août (août)

    September: Septembre (sept.)

    October: Octobre (oct.)

    November: Novembre (nov.)

    December: Décembre (déc)

    FORMULA IN FRENCH

    =FormatDate(ALaDate(SupprEspace

    (

    Si SupprEspace(Gauche([Event DateStamp];4)) DansListe ("mars";"mai";"juin";"août")

    Alors SupprEspace( Gauche([Event DateStamp];12) )

    Sinon Si Gauche([Event DateStamp];3) DansListe ("avr";"oct";"nov";"déc")

    Alors SupprEspace (Gauche([Event DateStamp];3) +". "+SousChaîne([Event DateStamp];4;9) )

    Sinon Si Gauche([Event DateStamp];4) DansListe ("janv";"févr";"juil";"sept")

    Alors SupprEspace (Gauche([Event DateStamp];4) +". "+SousChaîne([Event DateStamp];5;8) )

    );"mmm dd yyyy");"dd/MM/yyyy")

    Best Regards

    Marie

    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.