web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Format date depend on customer language

(0) ShareShare
ReportReport
Posted on by 1,470

Hi to all!

I want to create a string including a date, during the printing of the invoice layout. (For example: "Invoice date: 01/01/2014")

The problem is that the date is formatted depend on system's setup. I need to format the date depend on the language of the customer. 

Any ideas?

 

*This post is locked for comments

I have the same question (0)
  • Martina Bergamo Profile Picture
    1,470 on at
    RE: Format date depend on customer language

    This is exactly what I need!

    Thank you Denis!!!

  • Verified answer
    Denis Macchinetti Profile Picture
    16,444 on at
    RE: Format date depend on customer language

    Hi Martina

    Take a look at sinedax.blogspot.it/.../retrieve-format-for-numeric-and-date.html

    Practically, the RetailENInfo class use the System.Globalization.CultureInfo class.

  • Martina Bergamo Profile Picture
    1,470 on at
    RE: Format date depend on customer language

    I have already the language. This isn't the problem. I wanto to format the date from code. For example:

    in the table is saved : 01/01/2014 but for a german customer I want to print: 01.01.2014.

  • Community Member Profile Picture
    on at
    RE: Format date depend on customer language

    You need create a expression to format the report based on user language

    as per my understanding you need to modify the RDP class of the report so that tmp table returned as dataset of the report should have user language

    which you can use for date formatting

    Please verify and update us if this workaround helps you.

  • Martina Bergamo Profile Picture
    1,470 on at
    RE: Format date depend on customer language

    Hi Dan!
    Thank you for your reply!
    In Visual Studio I have no problem. There is a property for the date format.
    The reason why I need to put the date in a string, is that this string is the line header of the CustInvoiceTrans!
    And if I want to export the invoice with AIF I need the complete string (with the formatted date) in the field SalesInvoiceTmp.LineHeader.

  • Dan Emreus Profile Picture
    1,162 on at
    RE: Format date depend on customer language

    Hi Martina,

    I guess that you can either create a new field to the table SalesInvoiceHeaderFooterTmp and set date format depending on language and than use that field in the ssrs-report.

    Or you can use an expression in the ssrs-report directly that formats the date depending on language.

    /Dan

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans