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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
DrGenious
Creator
Creator

String to Date convert

Hi,

 

I have a column with strings like "2.02E+13". How can I make them Date type? 

 

Thanks a lot.

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

2.03E+13 is equal to 20 200 000 000 000 which doesn't represent a valid date, so...
Any way, you can convert your input to a string using String.format("%.0f", row1.yourValue) then use TalendDate.formatDate to convert the result to a date

View solution in original post

2 Replies
TRF
Champion II
Champion II

2.03E+13 is equal to 20 200 000 000 000 which doesn't represent a valid date, so...
Any way, you can convert your input to a string using String.format("%.0f", row1.yourValue) then use TalendDate.formatDate to convert the result to a date
DrGenious
Creator
Creator
Author

The solution I found is to convert my string to bigdecimal ,after to plainString and then parse it into .parseDate. But I will try also you solution. Thanks a lot for your help.