Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

How to set the date format differently in GP

Posted on by 125

Our company is world wide with a location in the United Kingdom. Since they are in their own database, is there a way to change the document date format of a report to default to their date format of dd-mm-yyyy?  This is in reference to report writer and word templates.

  • Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: How to set the date format differently in GP

    Glad to assist.  

  • MelissaK6201 Profile Picture
    MelissaK6201 125 on at
    RE: How to set the date format differently in GP

    Bill,

    YES!  The uppercase formatting did the trick.  I have a ton of templates to change but I am so grateful for the help.

    Thank you so much!!!!!!!!!!!!

  • Suggested answer
    Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: How to set the date format differently in GP

    pastedimage1621013815299v1.png

    In my Expression the date format is "MM/DD/YYYY"

    I may have in my notes, indicated in lower case - but I believe that upper case is the correct format for the String Constant in this case.

    This is how my customer in Canada wanted it to appear on his Check to Canadian Bank.

  • Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: How to set the date format differently in GP

    Let me connect to the system that has the Date change and I will send you a picture and hope that helps.

  • MelissaK6201 Profile Picture
    MelissaK6201 125 on at
    RE: How to set the date format differently in GP

    OK Bill thanks for that.  I will look into this as I am certain our UK work stations are set to their date format.

    I was able to get the calculation to print however it just shows dd/mm/yyyy.  What am I doing wrong here?  Any extra tips or tricks?

  • Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: How to set the date format differently in GP

    By default GP uses the date/time format as set on the workstation where the work is being generated.  If you are in US - with US date/time - then regardless of the data set you are using in GP, it is my understanding that the default dates will appear in US format.

    Hope this helps.

  • MelissaK6201 Profile Picture
    MelissaK6201 125 on at
    RE: How to set the date format differently in GP

    Bill,

    Thank you so much for all the detail in your response. I do struggle with calculations so having this step by step is huge!

    With that said my first attempt only produced an error, but I am trying again shortly.

    As for the original question, in a perfect world, GP would have a setting to change all date fields to the format desired so that this data could be entered & printed in the whichever format the decision maker wanted. I suspect that is not an option so for us it is more important that the customer see the appropriate format in any reports we send.

    Any additional information is appreciated and I will report back my success or failure of this second calculation attempt.

    Thanks so much!

  • Suggested answer
    Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: How to set the date format differently in GP

    Melissa, are you asking to have the report from that database generate with the dd-mm-yyyy format for all users, regardless of the location of the printer of the report?

    Reason asked is that GP takes the USER Date default based off the computer that is running the application.  So, a user in the UK should see the correct date format for their location if the setup on the workstations are done to allow for local date and time.

    I recently ran into this matter for one of our clients as well, the user liked a different date format on his workstation, but that effected the reports and so we had to modify the report - fortunately this is a single entity and we did not have to deal with multiple users.

    Here is what I did:

    1. In the Report Writer layout window, click Calculated Fields in the Toolbox list.

    2. Click New, and then type a name for the date field.

    3. In the Result Type list, click String.

    4. In the Expression Type area, click Calculated.

    5. Click the Functions tab, and then click User-Defined. In the Core list, click System. In the Function list, click RW_DateToString.

    6. Click Add.

    7. Click the Fields tab.

    8. In the Resources list, click the table that includes the date field that you want to modify.

    9. In the Field list, click the date field that you want to modify.

    10. Click Add.

    11. Click the Constants tab, and then click String in the Type list.

    12. In the Constant field, enter a format string. --->  dd-mm-yyyy ( or format as desired )  I did have to experiment to get the right one for my user requirements.

    Note For information about how to create a format string, see the "Options for the RW_DateToString user-defined function" section of the Report Writer manual

    13. Click Add.

    14. Click OK.

    15. Drag the new calculated field to the report.

    16. Close the report. When you are prompted to save the changes, click Save.

    If you do create a new modified report be sure to ensure you provide the required security to allow user access.

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans