rogerzebra
Technical User
Hi fellas,
I really don't know how to solve this one and I hope that someone can give me some hints or point me to some good posts/tutorials. I'm trying to retrieve the time differencies between two dates.
I have two events DateR, DateE and TimeDiff in table "test".
In another table "submission" I have clients ID(name).
When I query table "test" it's register as it should the time differencies in seconds. Which I want it to and it works fine. Now I need to make a SELECT from both tables based on the ClientsName as ID from "submission" get the result from TimeDiff in table "test" and recieve the result in datetime format and not seconds.
Did you guys got that?? So, I have tried to solve this on my own, but apperently I could need some help.
SELECT DateR, DateE,
FLOOR((TO_DAYS(DateE) - TO_DAYS(DateR))/60/60/24/7/4)
AS timediff
FROM test, submission WHERE NameInsured='$NameInsured',
I know this one is a longshot but, it's what I got.
What do you guys think?
As usual all inputs are much appreciated
/r
I really don't know how to solve this one and I hope that someone can give me some hints or point me to some good posts/tutorials. I'm trying to retrieve the time differencies between two dates.
I have two events DateR, DateE and TimeDiff in table "test".
In another table "submission" I have clients ID(name).
When I query table "test" it's register as it should the time differencies in seconds. Which I want it to and it works fine. Now I need to make a SELECT from both tables based on the ClientsName as ID from "submission" get the result from TimeDiff in table "test" and recieve the result in datetime format and not seconds.
Did you guys got that?? So, I have tried to solve this on my own, but apperently I could need some help.
SELECT DateR, DateE,
FLOOR((TO_DAYS(DateE) - TO_DAYS(DateR))/60/60/24/7/4)
AS timediff
FROM test, submission WHERE NameInsured='$NameInsured',
I know this one is a longshot but, it's what I got.
What do you guys think?
As usual all inputs are much appreciated
/r