Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
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],

View solution in original post

valnod_90
Contributor III
Contributor III
Author

It works!

thank you