Skip to main content
Question

DateFormatter

  • January 30, 2015
  • 8 replies
  • 77 views

Forum|alt.badge.img
Hi,

 

 

I Used a DateFormatter  to export MS Access data in the source format (DD/MM/YYYY)

 

eg 02/12/2014

 

 

Entered (%d%m%Y)

 

            (%d%/%m%/Y)

 

 

Parameters

 

Data Attributes: DateField

 

Date Format: (%d%m%Y)

 

Source Format: DD/MM/YYYY

 

 

The output is: 20140122000000.000 - The output should be 2/12/2014

 

 

Any suggestions??

 

 

Thanks,

 

 

Clive
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.

8 replies

takashi
Celebrity
  • January 30, 2015
Hi Clive,

 

 

Generally, FME readers translate a datetime value into a character string of "yyyymmddHHMMSS" or "yyyymmddHHMMSS.nnn" format automatically.

 

If you are using the Access reader, connect an Inspector transformer to the reader feature type and check the datetime format with the Data Inspector.

 

 

Takashi

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 31, 2015
Dont use automatic detection. That automaticaly puts all the zeroes.

 

Your second line ?

 

(%d%/%m%/Y) => (%d/%m/%Y)

Forum|alt.badge.img
Hi Gio,

 

 

How do you disable the automatic detection??

 

 

Regards,

 

 

Clive Swan

 

 

Forum|alt.badge.img
I created a Transformer (ExtractDate).

 

 

Date is exported as a number:

 

ExtractDate

 

20140122000000.000

 

20140122000000.000

 

 

Cannot see where to disable the automatic detection??

 

 

 

 

 

 

 

 

Thanks,

 

 

Clive

takashi
Celebrity
  • February 2, 2015
"DD/MM/YY" is invalid as the Source Date Format. See the help on the DateFormatter, and specify the source format in correct syntax.

 

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/dateformatter.htm

 

 


Forum|alt.badge.img
Date Attributes: ExtractDate

 

Date Format:     (%d/%m/%Y)

 

Source Format: (%d/%m/%Y)   

 

 

Still exporting Native Oracle format (ExtractDate: 20140122000000.000)

takashi
Celebrity
  • February 2, 2015
If the source date format is "yyyymmddHHMMSS.xxx", FME can detect datetime automatically. Set "Unknown - Automatic Detection" to the Source Date Format parameter (but if you are using FME 2014 or earlier, you have to remove decimal places ".xxx" beforehand).

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • February 2, 2015
or be done with it and just use tcl clock functions ....and take control ;) (i think fme uses that anyway, but tcl functions have a lareger scope)