Informational post: How to format the date value sent from a backend service at Foundry level

Hello All,

Please review the below details, these might be helpful. Thank you.

If a Date data is coming to the front-end application from a Foundry integration service, then for the response output parameter which retrieves the Date data in that integration service, you can specify

  • The value for ‘Format’ as ‘Date’ and
  • The value for ‘Format Value’ as ‘source date format~target date format

With the above configuration Foundry will automatically do the formatting of the Date value into the specified target date format and will return to formatted date to front-end application.

Example:

Here is an example. In the below screen shot, in the ‘Backend Response’, we are getting the value of ‘date_of_joining’ as ‘2015-01-29T18:41:14 +0000’, that is in ‘yyyy-MM-dd’T’HH:mm:ss Z’ format. We wanted to convert this date format to ‘dd/MM/yyyy’ and then send that formatted date to front-end application.

So for this ‘date_of_joining’ output parameter, we configured,

  • The value for ‘Format’ as ‘Date’ and
  • The value for ‘Format Value’ as ‘yyyy-MM-dd’T’HH:mm:ss Z~dd/MM/yyyy

In the output result we can see the formatted value of ‘date_of_joining’, just for our clear understanding I also included ‘date_of_joining_unformatted’ output parameter which shows the unformatted date. Thank you.

Thanks and Regards,
Venkata Raju Bankapalli

1 Like