Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Gowtham174
Creator
Creator

Add and Subtract for date and time column

Hi all,

Can you please help me to get two separate columns


add 4:30:00(hh:mm:ss) to the below date and time format.


16/06/2018 23:22:48

another column with Subtract 4:30:00(hh:mm:ss) to the below date and time format.

16/06/2018 23:22:48

Thanks,

Gowtham

1 Solution

Accepted Solutions
sunny_talwar

May be this

TimeStamp(Date#('16/06/2018 23:22:48', 'DD/MM/YYYY hh:mm:ss') + MakeTime(4, 30), 'DD/MM/YYYY hh:mm:ss') as StartTime,

TimeStamp(Date#('16/06/2018 23:22:48', 'DD/MM/YYYY hh:mm:ss') - MakeTime(4, 30), 'DD/MM/YYYY hh:mm:ss') as EndTime

View solution in original post

2 Replies
sunny_talwar

May be this

TimeStamp(Date#('16/06/2018 23:22:48', 'DD/MM/YYYY hh:mm:ss') + MakeTime(4, 30), 'DD/MM/YYYY hh:mm:ss') as StartTime,

TimeStamp(Date#('16/06/2018 23:22:48', 'DD/MM/YYYY hh:mm:ss') - MakeTime(4, 30), 'DD/MM/YYYY hh:mm:ss') as EndTime

eduardo_dimperio
Specialist II
Specialist II

Hi,

Try this:

vData=16/06/2018 23:22:48

vInterval= 4:30:00

vDataIni=Date(vData-vInterval)

vDataEnd=Date(vData+vInterval)