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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
SArencibia1627660461
Contributor
Contributor

How to add +2:00 hours and +1:00 hours to existing date format

Hi!

I need add +2:00 hours if < 22:00 hours and +1:00 hours if > 22:00 hours to existing data format but I don’t know to do... somebody could help me?

Labels (4)
3 Replies
Anonymous
Not applicable

Hello,

Are you trying to compare the current date or fixed incoming date?

Here is a ternary operation in tMap.

condition?true:false

Best regards

Sabrina

 

SArencibia1627660461
Contributor
Contributor
Author

Hi! Thank you for answering me. My problem is I try to apply this condition

row2.Fecha_licitacion.getHours()==22?TalendDate.addDate(row2.Fecha_licitacion,2,"HH"):TalendDate.addDate(row2.Fecha_licitacion,1,"HH")

 

But I can´t because these

 

 

Could you help me?

Anonymous
Not applicable

Hello,

This ternary operation in tMap is used for String type not Date. Please try to format your Date.

Best regards

Sabrina