06-13-2022 05:35 AM
Hi,
My requirement is to pass the date as a string “YYYY/MM/DD HH:MI:SS” as a parameter to Oracle procedure snap. I amssusing the expression - Date.now().toLocaleDateString({“format”:“yyyy/MM/dd HH:mm:ss”}).toString()
I can see the correct format in the value but while it is passed as a parameter it always has additional characters as below -
Could you please suggest how I can correct this expression?
06-13-2022 06:46 AM
What are the additional characters that you are getting?
The first screen date 2022/06/13 11:57:32 looks fine.
The second one 2022-06-13T12:03:38.000Z has completely different format.
BR,
Spiro Taleski
06-13-2022 07:13 AM
Yes, when it’s passed as a parameter to Oracle Procedure Snap it changed to 2022/06/13 11:57:32 > 2022-06-13T12:03:38.000Z.
Any way to keep it as 2022/06/13 11:57:32?
06-13-2022 08:55 AM
“Yes, when it’s passed as a parameter to Oracle Procedure Snap it changed to 2022/06/13 11:57:32 > 2022-06-13T12:03:38.000Z.” - this shouldn’t happen.
From the screen I can see that the date is mapped from input(“$p_processing_date”). It is not taken from parameter.
If you try to parse the value from parameter as date back, then you will get the “2022-06-13T12:03:38.000Z”.
So, if you procedure expect the field as date, probably you will need to handle the date conversion and format on procedure level. Otherwise, you can pass the field as string(without parsing back as date), directly from parameter: _p_processing_date
BR,
Spiro Taleski
06-13-2022 09:14 AM
Actually, it’s passed from parameter only, please see below and I couldn’t understand what do you mean by _p_processing_date and where I have to pass it?