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

Get hours in 24h from date

Dear experts, 

 

I would get hours from a date with is in this format : '2016-01-02 16:20:25.693'

In my case it's return 4 insted of 16.

 

In my tmap I've written for my field Heure  

Integer.parseInt(routines.TalendDate.formatDate("hh",row2.date_heure)) 

 

input

name : date_heure

format : date

values : 2016-01-02 16:20:25.693

 

output

name : heure

format : integer

values desired : 16 

 

Thank you for your help. Best regards.

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Hi,
Try to replace "hh" by "HH"'
Integer.parseInt(routines.TalendDate.formatDate("HH",row2.date_heure))

View solution in original post

2 Replies
TRF
Champion II
Champion II

Hi,
Try to replace "hh" by "HH"'
Integer.parseInt(routines.TalendDate.formatDate("HH",row2.date_heure))
Anonymous
Not applicable
Author

Dear TRF, thank you for your help. 

 

 

Perfect, it's works !