Skip to main content
Question

Change ouput format of datetime in Excel_ADO Writer?

  • October 31, 2013
  • 2 replies
  • 15 views

Hi!

 

 

How do I change the output format "datetime" in Excel_ADO writer?

 

In the reader the date is on YYYY-MM-DD format but when i'm writing it into Excel_ADO the format changes to YYYYMMDD000000, probably on the format YYMMDDHHMMSS.

 

 

How can I get the Excel_ADO writer to print it in the ouput file on YYYY-MM-DD format instead?

 

 

Best regards

 

 

Christer
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • October 31, 2013
Hi Christer,

 

 

As far as I know, database writers (e.g. SQL Server) convert automatically a datetime string formatted in YYYYmmdd / YYYYmmddHHMMSS to a datetime value, when writing the value into datetime type field.   I tested Excel writer in FME 2013 SP4, Windows Xp SP3.

 

Input datetime string format is YYYYmmddHHMMSS in all cases.

 

 

Results:

 

1) XLS_ADO writer, Excel version 97/2000/2002/2003 (*.xls)

 

Writer User Attribute Type = datetime

 

The value is written as a datetime value. But the field format cannot be specified in FME, it has to be modified manually after writing if necessary.

 

 

2) XLS_ADO writer, Excel version 2007 (*.xlsx)

 

Writer User Attribute Type = datetime

 

The value is written as a character string. Why?

 

 

3) XLSXW writer (new Excel writer added in FME 2013 SP2)

 

Writer User Attribute Type = datetime

 

The value is written as a datetime value, and also the field format (e.g. yyyy-mm-dd) can be specified in the writer feature type dialog box.

 

 

Traditional XLS_ADO writer is currently deprecated. I recommend you to use new XLSXW writer, if possible.

 

 

Takashi

Forum|alt.badge.img
  • January 16, 2015
Hi,

 

 

Having just specified the date format for a lot of dates in my workspace, I really miss a way of specifying the default date format for writing to Excel.

 

 

Regards,

 

Steinar