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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Convert String "(11 MAY 2011)" to Date

Hello community,

I want to convert string to date(dd/mm/yyy) ,The string has a forme (11 MAY 2011)

when i try to use the function TalendDate.parseDate("dd/mm/yyyy",row1.nomduchamps)  i get an error

Please any help 

Thanks in advance 

Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hello Lilya,

 

I tried TalendDate.parseDateInUTC("dd MMM yyyy","11 MAY 2011") and it worked.
Here as per your query the type of input argument("11 MAY 2011") is String.
I kept Data type of destination column as Date and "dd-MM-yyyy" as Date Pattern.
It returned 11-05-2011 as output
Hope it helps !!

 

Thanks,
Trupti

Anonymous
Not applicable
Author

i'm trying your solution(TalendDate.parseDateInUTC("dd-MMM-yy",row1.STMDMVT))

but i get this error

java.lang.RuntimeException: java.text.ParseException: Unparseable date: " "

Thinks

 

 

TRF
Champion II
Champion II

@shima row1.STMDMVT is probably null or empty (or may contains a space character based on your message)
jilanisyed
Creator
Creator

Hi Liya,
Try the following code in tmap.

TalendDate.parseDate("dd MMM yyyy",row1.DateString)
SachinD
Creator
Creator