cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect date format

amit_saroha
New Contributor III

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 -

image

image

Could you please suggest how I can correct this expression?

11 REPLIES 11

Oracle Procedure snap accepts number type parameter so I have to convert it to integer in this snap. This looks like a product bug to me.

You’re using .toLocaleDateString() while passing a DateTime format. Also, you don’t need the .toString() function, the previous one already puts the date into stringified version. Make sure you change that and validate.