Skip to main content
1-Visitor
Jun 24, 2015 7:47 PM UTC
Question

Custom Test Result Date Fields Not Formatting

I have two date fields that I created for my test results: Execution Date and Execution Modified Date. When I kick them out to an html report, they do not format per the definition in the report wizard. Other date and date time fields do though. Is this a bug or am I doing something incorrectly? I can use JavaScript as a work around but I would prefer to not have to do that.

    4 replies

    1-Visitor
    Jun 25, 2015 7:16 PM UTC

    To elaborate a bit more...

    After </head> and before <body>, I have: <%dateformat%> and <%datetimeformat%>

    In the report wizard, I have specified:

    Date Format: dd MMM yy

    Date Time Format: dd-MMM-yy HH:mm

    When I run the report, the normal Modified field spits out: 08-Jun-15 10:02

    My custom test result field spits out: Jun 2, 2015 6:24:02 PM

    Translate
    17-Peridot
    Jul 15, 2015 7:27 PM UTC

    HI Nolin,

    I am not sure if internally the custom test result fields are stored as chars only. This would clarify why it comes out like it comes.

    Depending on the critcality of your request, you may ask our Support how to solve.

    - Volker

    Translate
    1-Visitor
    Jul 15, 2015 7:34 PM UTC

    Volker,

    I have it solved for now just by using JavaScript to parse it as a string and reformat it.

    The field type is date. If it's stored as chars like you're suggesting, then that would explain the behavior. It sounds like that would be a bug since the reports should treat fields based on how they are defined in the admin client.

    Thanks,

    Nolin

    Translate