Options

Date format for reports and data exports

RobbieXRobbieX Member Posts: 66
Hi there.....

After searching for an answer to this question, I could not find anything....my apologies if I missed something.

Working for a Navision end user, a company which employs people of numerous nationalities, we find that the computer clients have different language settings. As a result, there are the following date possibilities:

Chinese format: 05-08-10 = 10th August 2005
Euro format: 10/08/05 = 10th August 2005
USA format: 08/10/05 = 10th August 2005

You can imagine that this can cause quite a lot of confusion, especially on reports and data exports, when people may end up using different shared computers with different language settings.

Is there standard function or any other way that these dates can always be translated into a format that cannot be misunderstood, eg 10th August 2005, for all reports and data exports to text and csv files?

Thanks again in advance for your help.
Robbiex

Comments

  • Options
    nvgnvg Member Posts: 25
    Dear Robbie,

    Strange that u have never noticed the standard reports in Navision. All of them have date on the right top of the page where it shows the USERID and the Page No.

    See the Format used to show the Current System Date there.

    FORMAT(TODAY,0,4)

    when u use this, u see something like 26 August 2005.

    Check out other options for Date formats too in help. This works well for Reports, but for dataports, I am not sure whether this solution would work or not (while doing an import).

    Regards,
    NVG
  • Options
    DenSterDenSter Member Posts: 8,304
    Navision should pick up the language settings of the computer that connects to the database. I have seen this work with one of our international customers, where the people in Holland see the day first then the month, and the people from the US see it the other way around. Navision stores dates internally anyway, and uses the windows settings to display it on the forms.

    Anyway, this worked in 2.6, so I imagine it still does in 4.0 :)
  • Options
    KowaKowa Member Posts: 918
    For international date data exchange it is best to use the International Standard ISO 8601. (YYYY-MM-DD).
    http://www.cl.cam.ac.uk/~mgk25/iso-time.html

    Navision format expression :
    <Year4>-<Month,2>-<Day,2>
    ( can directly be filled in the format property of the dataport field)

    In the textfiles the hyphens sometimes are ommitted (YYYYMMDD)
    <Year4><Month,2><Day,2>
    Kai Kowalewski
  • Options
    DenSterDenSter Member Posts: 8,304
    The thing is though, if you do it like that, you basically hardcode the format on the form, and everybody is forced to see it like that, no matter what country you are from. By leaving the format property alone, Navision *should* display dates the way that windows is set up to display dates. A person from the US should see it like mm/dd/yyyy, and a person from Holland should see it like dd/mm/yyyy, and they are both connected to the same database.

    You shouldn't have to be concerned about programming the dates to be displayed at all. The windows settings should do the trick.
  • Options
    KowaKowa Member Posts: 918
    DenSter wrote:
    The thing is though, if you do it like that, you basically hardcode the format on the form, and everybody is forced to see it like that, no matter what country you are from.
    I wouldn't use in a form either, but I strongly recommend this for dataports.
    It's not to make the normal user unhappy, but to make programmers happy in enabling to avoid date conversion errors which tend to come up all the time. The only problem with international standards is that they have to be used internationally. :wink:
    Kai Kowalewski
  • Options
    RobbieXRobbieX Member Posts: 66
    Thanks very much guys!
    That info was just what I needed.
    Have a great day!
    Robbiex
Sign In or Register to comment.