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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dates in TMap

Could someone help me please, i am struggling to sort this issue out. I am using Tmap to do a date comparison. I am using two dates in format dd/MM/yyyy. I need to compare only the MM/yyyy and not read in the dd.
For some reason i think its not working. i used this statement in my Tmap
TalendDate.compareDate(myDate,myDate2,"MM/yyyy") == 0
i have two entries like this
file delimited = 12/01/2010
MySqlInput(lookup table) = 00/01/2010
i want to compare the two dates using only the month and year , if they are the same i want to pass to the next stage. the record is actually being passed to the error file for some reason the match aint taking place.
Could someone help me with this problem please.
If possible can i compare a string and just the MM/yyyy from date at all.
my input file also has a column with just mm/yyyy but it is a varchar as it is coming from a mysql table and then the lookup table doesnt have this it only has a date dd/MM/yyyy. If i cant use the date compare first option above can i compare the string value and date value in TMap at all. Please help.

many thanks
Labels (2)
4 Replies
Anonymous
Not applicable
Author

I'm not sure what are you trying to do... you should post you tmap screenshot.
anyway if you want to lookup a table based by a "MM/yyyy" string key, just use TalendDate.parsedate to obtain the relevant string part...
janhess
Creator II
Creator II

You could try the Talend routine dateCompare or reformat the dates for comparison.
Anonymous
Not applicable
Author

i have a input file with date column as format december 1, 2013
and i m using TalendDate.parseDate("MMM dd, yyyy",row2.ReviewDate) in tmap and it is not working please help
Anonymous
Not applicable
Author

Hi shersushant,
"MMM" is for "Dec" and"MMMM" is "December".
Best regards
Sabrina
0683p000009MCh2.png 0683p000009MCOW.png