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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
SMahadevan1608028474
Contributor
Contributor

Convert String to Date format

DOB

22/12/2020 - String (10)

In output table am converting this column to Date format

TalendDate.parseDate("dd/MM/yyyy",row1.DOB)

I have changed this datatype as Date ,length 10 and changed the expecting date Pattern as" YYYYMMDD" am expecting output as 202012357 instead of 20201222.

 

Even I have tried with Var port method as well but still am facing the same issue.

 

I have observed when the time is 00:00 this issue is not occurs, attached the screenshot below,

Labels (2)
1 Solution

Accepted Solutions
Peter_Mitchell
Contributor II
Contributor II

https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

 

Capital D is Day In Year. Lower d is Day In Month. You want yyyyMMdd.

View solution in original post

2 Replies
Peter_Mitchell
Contributor II
Contributor II

https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

 

Capital D is Day In Year. Lower d is Day In Month. You want yyyyMMdd.

SMahadevan1608028474
Contributor
Contributor
Author

Thanks for your input and it's working fine