โ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?