Skip to Content

Backoffice Excel Export Date Format

Hi Experts,

I want to use customized date format while exporting the data from backoffice through export excel.

By default OOTB provides ExcelJavaTypeTranslator translator which is providing date format as "dd.MM.yyyy HH:mm:ss" in ExcelDateUtils.

I am extending ExcelJavaTypeTranslator translator and overriding the methods with custom logic where i made date format as "MM/dd/yyyy HH:mm:ss"

*-spring.xml:

<cng:list-extender bean="excelTranslatorRegistry" property="translators">
   <cng:add>
      <ref bean="medExcelRetailerDateTranslator"/> 
   </cng:add>
</cng:list-extender>

<alias name="medExcelRetailerDateTranslator" alias="medExcelRetailerDateTranslator"/>
<bean id="medExcelRetailerDateTranslator" parent="excelJavaTypeTranslator">
</bean> 

But everytime while exporting the data in excel its creating the date format as "dd.MM.yyyy HH:mm:ss".

Is there anything that needs to be configured?

Any help would be appreciated?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.