[resolved] HOW TO GET HOUR IN PM FORMAT

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

All Replies
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.
Five Stars

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

OK Thanks tal00000 
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,

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads