Yes, it is possible to format a date in Pega to show “x days x hours” using the simple format tag. Here’s how you can do it:
<fmt:formatDate value=“${yourDate}” type=“relative”/>
The fmt:formatDate tag is a JSP tag that allows you to format dates. The type attribute specifies the format of the date. In this case, we are using the relative type, which formats the date as a relative time, such as “x days x hours”.
For example, if your yourDate variable contains the date 2023-03-08 10:30:00, the above code will output something like “3 days 12 hours”.
Note that the relative type is only available in Pega 8.5 and later. If you are using an earlier version of Pega, you will need to use a different formatting method.