Skip to main content
1-Visitor
June 24, 2015
Question

Custom Test Result Date Fields Not Formatting

  • June 24, 2015
  • 1 reply
  • 2182 views

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.

    1 reply

    1-Visitor
    June 25, 2015

    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

    17-Peridot
    July 15, 2015

    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

    1-Visitor
    July 15, 2015

    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