Skip to main content
Question

Convert datestamp values to friendly UK date format


scarter
Contributor
Forum|alt.badge.img+9

Hi,

 

I have a geojson including an attribute with datestamp values. An example value is 202410231836 (year, month, date, hours, minutes - yyyy mm dd hh mm). These are important as I’m running testFilters with it. 

 

However I would also like to create a parallel attribute showing an easy to read UK date value from it. So, 202410231836 would convert to ‘31/10/2024 18:36’.

I’ve been looking at DateTimeConverter transformer but couldn't work out what import format to use and what output format to pick - assuing that DateTimeConverter is the one to use.

Any advice would be appreciated.

 

Thanks,

Stuart

 

5 replies

andrewj74
Supporter
Forum|alt.badge.img+5
  • Supporter
  • June 13, 2024

if you leave the input format blank it should autodetect that? if not use the quick guide reference at the bottom to construct it 

 

 

 


mark2atsafe
Safer
Forum|alt.badge.img+44
andrewj74 wrote:

if you leave the input format blank it should autodetect that? if not use the quick guide reference at the bottom to construct it

 

It will only autodetect the FME format or ISO formats. But this one is pretty straightforward. It looks like %Y%m%%d%H%M for input and %d/%m/%Y %H:%M for output.


scarter
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • June 17, 2024

Thanks for that @mark2atsafe .

 

I’ve tried that, assuming that I use End_date and Start_date as the ‘Datetime_attributes’…

 

But I get this result…

 

 

Thanks,

Stuart

 


andrewj74
Supporter
Forum|alt.badge.img+5
  • Supporter
  • June 17, 2024
scarter wrote:

Thanks for that @mark2atsafe .

 

I’ve tried that, assuming that I use End_date and Start_date as the ‘Datetime_attributes’…

 

But I get this result…

 

 

Thanks,

Stuart

 

looks like there is an extra % in the input?

 

%Y%m%%d%H%M  - %Y%m%d%H%M


scarter
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • June 17, 2024

Hi @mark2atsafe . That is resolved now. Thanks.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings