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: 
Not applicable

convert date

how can i calculate this instruction:

1-1.1*(date_debut-date_fin)/date_fin as offf

the problem is in the date i couldn't convert it into a number.

Labels (1)
18 Replies
Anonymous
Not applicable
Author

Hi,

As u mentioned i substituted the values for that fields in a text object ,got 1.94

1-1.1*(num('17:26:19')-num('120:00:00'))/num('120:00:00')

Not applicable
Author

you can considrate any time 4 example: 10:11:13

its_anandrjs
Champion III
Champion III

Then convert it into Hour, Minutes or seconds from your requirement in the formula

Regards

Anand

Anonymous
Not applicable
Author

1-1.1*(subfield(date_debut,':',1)*3600+subfield(date_debut,':',2)*60+subfield(date_debut,':',3)-subfield(date_fin,':',1)*3600+subfield(date_fin,':',2)*60+subfield(date_fin,':',3))/(subfield(date_fin,':',1)*3600+subfield(date_fin,':',2)*60+subfield(date_fin,':',3)) as offf

Anonymous
Not applicable
Author

@youssef assenane:

is the above expr still not working?

MarcoWedel
MVP
MVP

QlikCommunity_Thread_139252_Pic1_.JPG.jpg

=1-1.1*('17:26:19'-'120:00:00')/'120:00:00'

QlikCommunity_Thread_139252_Pic2.JPG.jpg

Not applicable
Author

it's still not working

Not applicable
Author

how you get that

Not applicable
Author

but why when i do  =1-1.1*(DUREE_INCIDENT-duree_trajet)/duree_trajet in text objet i get -27,176