Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

New Date Formats using format function

New Date Formats using format function

Use Case:

We have one offering in which the user has to pick a date as user option and one automated task has to call to OO flow sending the date selected by the user.

The issue is the format that OO is expecting that date: "dd/mm/yyyy" including zeros and "20" for year. (We cannot modify the OO flow because it is being used by other external tools)

As you know, SMAX stores the dates as unix format (milliseconds) and we have to format the user option.


My point is that i have tried to use the format function for dates but we have the following issue (see image):

Requirement:

We need to send the correct string to OO. For example: "09/10/2018" but using the format function, we only get "9/10/18" --> There is no "0" or "20"

is it possible use the format function to retrieve a date value (milliseconds) specificing the mask like format(entity.datefield,'dd/mm/yyyy hh24:mi:ss') or get the correct mask with zeros as example "1st May of 2018" will be 01/05/2018 instead of 1/5/18?

I have tried:

  • ${format(now(),'short_date')}
  • ${format(now(),'short_date','es')}
  • ${format(now(),'short_date','es','dd/MM/YYYY')}

Example

1. End user with spanish language as laguage preferences when selects an user option (date type) through the portal, smax displays the date with the following mask:
DD/MM/YYYY
For example: 1st May will be displayed as 01/05/2018 when end user use the calendar
2. Using the fortmat function for dates: format (entity.Useroptions.dateuo,short_date,'es'), smax displays 1/5/18 and this is incorrect. There is no zeros and no coincidence between the user see and smax retrieves with a function.
1 Comment
Micro Focus Expert
Micro Focus Expert
Status changed to: Waiting for Votes

Thank you for sharing your idea! It’s open for comments and kudos, and we’re looking forward to input from the community. Once there is enough community traction, it will be further reviewed by the product team.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.