eydeak
VIP Member
Hi,
I wanted to get some feedback on how people are dealing with different date formats inside orchestrations and service requests. Here is a simple example:
I have form service request 1 which runs an application to return a date value. This service request is returning an empty date as the word NULL and a populated date in format YYYY-MM-DD.
I have a second form service request running another application to update a date value. The form will validate the date entered based on user profile date format, which varies for users in different countries. Example USA users are MM/DD/YYYY and China users are DD/MM/YYYY.
I have an orchestration where I pass in some values and then execute form request 1 to find the date, then execute form request 2 to update the date somewhere else.
If I simply map the date returned from form request 1 into the date in form request 2, it will always fail as an invalid date due to the formatting of the date.
The only thing I've come up with to handle this is to use custom service requests to get the user profile and groovy script to convert the date to user profile format. Then I can pass the properly formatted result into form request 2.
I was wondering if anyone else out there has other tips or tricks for dealing with this kind of situation. Perhaps something easier that I've been over looking. Someplace maybe where I can tell the form requests to return dates in user profile format?
Thanks,
Ellen
I wanted to get some feedback on how people are dealing with different date formats inside orchestrations and service requests. Here is a simple example:
I have form service request 1 which runs an application to return a date value. This service request is returning an empty date as the word NULL and a populated date in format YYYY-MM-DD.
I have a second form service request running another application to update a date value. The form will validate the date entered based on user profile date format, which varies for users in different countries. Example USA users are MM/DD/YYYY and China users are DD/MM/YYYY.
I have an orchestration where I pass in some values and then execute form request 1 to find the date, then execute form request 2 to update the date somewhere else.
If I simply map the date returned from form request 1 into the date in form request 2, it will always fail as an invalid date due to the formatting of the date.
The only thing I've come up with to handle this is to use custom service requests to get the user profile and groovy script to convert the date to user profile format. Then I can pass the properly formatted result into form request 2.
I was wondering if anyone else out there has other tips or tricks for dealing with this kind of situation. Perhaps something easier that I've been over looking. Someplace maybe where I can tell the form requests to return dates in user profile format?
Thanks,
Ellen