Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] HOW TO GET HOUR IN PM FORMAT

Morning All,
I try to get hour in PM Format from my date column.
I use this expression in my tMap: 

TalendDate.getPartOfDate("HOUR",row1.Date_debut_Formation) 



And my date column format look like this: "dd/MM/yyyy HH:mm"
Exemple of data (Input)
14/04/2016  09:00:00
06/04/2016  10:00:00
14/04/2016  17:00:00
27/05/2016  18:00:00
Result (Output)
9
10
5
6
May somebody explain me why i don't get PM value ?
Because for me, result should be: 9 , 10, 17, 18

Thanks,

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello,

I find solution to this problem on this link: https://community.talend.com/t5/Design-and-Development/Date-and-Time-Format-With-HH24/m-p/65183
You need to edit TalendDate routine file by adding DAY_OF_WEEK parameter.

Thanks,

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Unfortunately, this is a limitation with the Talend method, as it does not support HOUR_OF_DAY (24 hour clock).
Someone may know an elegant Talend way of doing this, otherwise you'll need to do it yourself with your own Java routine.
Anonymous
Not applicable
Author

OK Thanks tal00000 
Anonymous
Not applicable
Author

Hello,

I find solution to this problem on this link: https://community.talend.com/t5/Design-and-Development/Date-and-Time-Format-With-HH24/m-p/65183
You need to edit TalendDate routine file by adding DAY_OF_WEEK parameter.

Thanks,