Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
valnod_90
Contributor III
Contributor III

Calculate date from time field

Hello everyone,

i'm not sure that i am in the right section of the forum but i have a question for you and i really hope you could help me.

I have two saparated fields: "Date" and "Time", that are correlated with each other.

I need to subtract 26 hours from the field "Time" and then extract the new date.

For example:

Starting Date: 2/10/2018

Starting Time: 8:00:00

If i subtract 26 hours the new time will be 6:00:00 but i need to know even the new date.

How can i do it?

Thank you!

1 Solution

Accepted Solutions
sunny_talwar

May be try this

Time(Frac([Starting Date] + [Starting Time] - 26/24)) as [New Start Time],

Date(Floor([Starting Date] + [Starting Time] - 26/24)) as [New Start Date],

View solution in original post

2 Replies
sunny_talwar

May be try this

Time(Frac([Starting Date] + [Starting Time] - 26/24)) as [New Start Time],

Date(Floor([Starting Date] + [Starting Time] - 26/24)) as [New Start Date],

valnod_90
Contributor III
Contributor III
Author

It works!

thank you