Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

strFormat possibilities for format-dateTime-withFormat

Avatar

Former Community Member

Hi, this is a silly question I am sure, but I would love to see the possible values for strFormat in the function format-dateTime-withFormat.  The format for the call in the XPath developer is format-dateTime-withFormat(strDateTime, strFormat, (language, country, variant, timezone)?)  The documentation does not list this function and I cannot find anything about strFormat.

Any ideas?

2 Replies

Avatar

Level 2

In workbench help -> Creating processes -> Xpath function reference -> String functions -> Date and time parameters section describes different representations used in expressing date/time.

So, e.g. if you pass yyyy-mm-dd as strFormat, it should return date in that format.

if you pass mm/dd/yyyy, it should format input datetime in that way and return it back.

Avatar

Level 7

This seems to be the top Google search result for format-dateTime-withFormat so I will post the necessary information here (as its either missing or curiously not searchable in the Workbench help pages).

If you want to know what all of the possible strFormat combinations are, look in the Java reference for SimpleDateFormat:

http://docs.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html