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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

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

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)