Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to run a query and am encountering error when converting the date.
Variable name = startDate
type = Date
value = 2020-01-03 00:00:00
function = TalendDate.formatDate("yyyy-MM-dd",context.startDate)
expected output = 2020-01-03
Actual output = 2020 - 1 - 3
If I don't use formatDate my output is equally useless = Fri Jan 3 2020 etc.
I am just trying to do a basic query : SELECT * FROM {table] WHERE {field} >
TalendDate.formatDate("yyyy-MM-dd",context.startDate)
How do I get the expected output?
Hi, Please check the date type Pattern in the input component. Tranformation:
TalendDate.formatDate("yyyy-MM-dd",row1.startDate )
output: