Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
The question is what you like to achive with this calculation, as it will deliver nearly 1 for all contemporary timestamps.
hope this helps
regards
Marco
Try this:
1-1.1*(floor(num(date_debut))-floor(num(date_fin)))/floor(num(date_fin)) as offf
Use num function to covert it into a number
1-1.1*(num(date_debut)-num(date_fin))/num(date_fin) as offf
no it doesn't work, for exampl if
date_debut:17:26:19
date_fin:120:00:00
i must have 1,94,but when tried the functions that you suggested i've got: 3,65
The question is what you like to achive with this calculation, as it will deliver nearly 1 for all contemporary timestamps.
hope this helps
regards
Marco
I don't recognize that date format. What are the 3 (:) delimited parts?
Have you checked that the dates are represented correctly before you convert them into numbers?
it's time not date hh:MM:SS
Try this way also
Load
1 - 1.1 * ( Date( date_debut ) - Date( date_fin ) ) / Date( date_fin ) as offf
From Location;
Regards
Anand
What kind of timestamp is "date_fin:120:00:00"?