What transformer can I use to put a date into YYYY - MM - DD format with no time format in final result?

user3376708 picture user3376708 · Mar 17, 2014 · Viewed 8.5k times · Source

I just started using webMETHODS today and need to transform a date input value that comes in like this.

Example:

yyyy-mm-dd hh:mm:ss:hh

I need just the date portion of this variable and am currently using pub.date:formatDate which will crash my flow service.

What should I be using?

This is what I see on my WEBMethods screen!

Answer

Christian Strempfer picture Christian Strempfer · Mar 24, 2014

An alternative would be to use pub.date:dateTimeFormat, which allows you to set an input pattern, for example dd.MM.yyyy hh:mm:ss.