Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
JSanda15
Contributor
Contributor

Output doesn't match date formatting

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?

Labels (2)
1 Reply
jilanisyed
Creator
Creator

Hi, Please check the date type Pattern in the input component. Tranformation:

0693p00000BVMBxAAP.pngTalendDate.formatDate("yyyy-MM-dd",row1.startDate ) 

 

output:

0693p00000BVMB4AAP.png