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

what do you mean by _p_processing_date

In SnapLogic terminology:

  • when you reference a field, it is prefaced with the dollar sign ($)
  • when you reference a parameter (which is defined in the pipeline properties), it is prefaced with the underscore (_). Parameters are strings.

So if the p_processing_date was a parameter, you would use _p_processing_date.
In this case, you are mapping a date to a field.


Diane Miller
Community Manager

amit_saroha
New Contributor III

Hi All, can anyone suggest how to handle this situation?

amit_saroha
New Contributor III

I don’t have a parameter it’s but the current data is generated in the mapper and I am passing it to oracle procedure snap as the parameter.

Do you think I need to change the date again to the string?

jcornelius
New Contributor III

toLocaleString() is adding the timezome, same for toUTCString()…you could just add a .split(‘.’)[0] to remove the string value for timezone

bojanvelevski
Valued Contributor

What is the purpose of the “Parameters to Integer” snap ?