Due to essential maintenance, access to Trados cloud will be unavailable on Saturday 30 August from 00:00 to 12:00 UTC.

Date format on "Print Invoice"

Former Member
Former Member

Hi,

Our customer wants to change date format on preview of "Print Invoice".

It is always shown as "DD.MM.YYYY" although he can input as "YYYY/MM/DD". He wants to output with the format "YYYY/MM/DD" according to Japanese habit.

Is it possible to change this?

Parents Reply
  • Former Member
    0 Former Member in reply to Eugene Kuchynski

    Hi

    I am trying but I cannot change.

    Editing Report Designer:

    Screenshot of Trados Studio's Report Designer with a script tab open showing code to change date format to Japanese culture settings.

    Preview after saving:

    Preview of an invoice in Trados Studio's Report Designer with the date format unchanged, still displaying as DD.MM.YYYY.

    Date format is still DD.MM.YYYY.

    I entered followings in script tab:

    private System.Globalization.CultureInfo originalCulture = null;

    private void Invoice_v1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
    originalCulture = System.Threading.Thread.CurrentThread.CurrentCulture;
    System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ja-jp");
    }

    private void Invoice_v1_AfterPrint(object sender, System.EventArgs e) {
    System.Threading.Thread.CurrentThread.CurrentCulture= originalCulture;
    }

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 10:41 AM (GMT 0) on 4 Mar 2024]
Children