Menu

Date being exported in incorrect format

Help
2012-08-09
2020-05-21
  • Ian shepherd

    Ian shepherd - 2012-08-09

    I am using Bugtracker in the UK and have updated webconfig to give me the date in UK format (DD/MD/YY)
    The date displays correctly on the BT homepage in the 'reported on' and 'updated on' fields, however when I export to excel or click 'print list' the date reverts to US format (MM/DD/YY) - How do I change this ?

    Thanks

     
  • Ian shepherd

    Ian shepherd - 2012-08-09

    Oops , typo on the first line - obviously should be DD/MM/YY

     
  • Corey Trager

    Corey Trager - 2012-08-11

    I don't know… I guess it's a bug…

     
  • Raph

    Raph - 2012-10-01

    Hi,

    I am using BT v3.5.0
    I have the issue as "ianshepherd" with BT and date format when exporting to Excel.
    Hereunder are some more details :

    MY SETTINGS

    - I have, within a Query/View, the standard field "reported by" and a CustomField "Review Date"
    - It seems that "Review Date" only contains a date (time is always 00:00:00) whereas "reported by" is rather a TimeStamp field (time is

    included)
    - I set the Date settings as follows :
         1. Web.Config - key="DateTimeFormat" value="dd/MM/yyyy HH:mm"/>
         2. Web.Config - key="JustDateFormat" value="dd/MM/yyyy"/>
    This corresponds to the French/EU formats, I am not detailing here the "DatepickerDateFormat" key, I have also detected a small issue with

    it but it's much less annoying and maybe related to the issue as well at the end..

    - I understand from my tests that (correct me If I am wrong !) :
    -> "DateTimeFormat" applies to TimeStamp fields e.g. all native fields of BT.
    -> "JustDateFormat" applies to Date fields e.g. all Custom Fields of BT

    TEST 1

    - I consider a Bug with following real attributes (still French format) :
    -> reported by = "01/10/2012 08:02:35" e.g. today during breakfast
    -> Review Date = "01/10/2012 11:46:12" e.g. today before lunchbreak

    - The display in my BT query is correct, I can see :
    -> reported by = "01/10/2012 08:02"
    -> Review Date = "01/10/2012 00:00"

    - However when I export to Excel, I get the following wich is not correct :
    -> reported by = "10/01/2012 08:02" (date was recognize by Excel)
    -> Review Date = "10/01/2012"       (date was recognize by Excel)
    It seems data are "given" to Excel as they are exctracted from the DB (where format is I guess the US one e.g. MM/dd/yyyy…)
    As a result, the Day and Month of dates are swapped in Excel.
    The problem is that the custom format are not applied to dates, when they are extracted from the DB to be "given" to Excel.

    TEST 2

    Second test with other dates :
    -> reported by = "28/09/2012 08:02:35" e.g. last friday during breakfast
    -> Review Date = "28/09/2012 11:46:12" e.g. last friday before lunchbreak

    Display in BT is ok, export to Excel gives :
    -> reported by = "9/28/2012 8:02:35 AM"  (this is text format, date was NOT recognize by Excel ebcause of the month 28..)
    -> Review Date = "9/28/2012 12:00:00 AM" (this is text format, date was NOT recognize by Excel ebcause of the month 28..)

    Would there be any kind of solution for this issue ?
    Let me know if I can be of any help (testing).

    Thanks a lot,
    Raphaël

     
  • Corey Trager

    Corey Trager - 2012-10-02

    I think I see where the problem is and I will try to fix it in the next release.

     
  • Raph

    Raph - 2012-10-04

    Excellent !

    Thank you.
    Raphaël

     
  • Greg Wilson

    Greg Wilson - 2020-05-21

    Great Tip!
    Adding the line into Web.Config

    <add value="dd/MM/yyyy" key="JustDateFormat"></add>

    Solved the problem for me in the latest version.

     

Log in to post a comment.