08-09-2019 05:54 AM
I am passing a timestamp as a variable through pipeline parameter as ‘p_querystring_modifieddateafter’.
while applying logic as below in mapper and in REST GET snap parameters, I am getting the failure :
Logic in Mapper :
_p_querystring_modifieddateafter.minusDays(1).toLocaleDateString()+“T00:00:00.000”
tried with below logic also, still failing,
LocalDateTime.parse(_p_querystring_modifieddateafter).minusDays(1).toLocaleDateString()+“T00:00:00.000”
let me know if i am making any mistake…
08-09-2019 09:44 AM
Can you give an example of one of these timestamps? It looks like LocalDateTime.parse()
is not parsing it correctly and returning a NaN
. Also, is there are reason you’re using LocalDateTime.parse()
instead of Date.parse()
? Note that LocalDateTime
objects do not have the date math methods like minusDays()
.
08-09-2019 12:38 PM
Ex :
2019-08-09T06:51:07.000
this need to be converted like : 2019-08-08T00:00:00.000
08-09-2019 01:07 PM
This expression:
Date.parse(“2019-08-09T06:51:07.000”).minusDays(1).toLocaleDateString()+“T00:00:00.000”
results in: 2019-08-08T00:00:00.000
Note the only change in the expression from your original one is the use of Date.parse() instead of LocalDateTime.parse()
08-10-2019 12:45 AM
for this logic :
Date.parse(“2019-08-09T06:51:07.000”).minusDays(1).toLocaleDateString()+“T00:00:00.000”
error :
Could not compile expression: Date.parse(“2019-08-09T06:51:0 … (Reason: Invalid token: ‘“’ for expression: Date.parse(“2019-08-09T06:51:0 …; Resolution: Please check expression syntax)
attached are screenshots.