[resolved] HOW TO GET HOUR IN PM FORMAT

Highlighted
Five Stars

[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,


Accepted Solutions
Highlighted
Five Stars

Re: [resolved] HOW TO GET HOUR IN PM FORMAT

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


All Replies
Highlighted
Five Stars

Re: [resolved] HOW TO GET HOUR IN PM FORMAT

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.
Highlighted
Five Stars

Re: [resolved] HOW TO GET HOUR IN PM FORMAT

OK Thanks tal00000 
Highlighted
Five Stars

Re: [resolved] HOW TO GET HOUR IN PM FORMAT

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

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog