Link to home
Start Free TrialLog in
Avatar of jamesh1031
jamesh1031Flag for United States of America

asked on

Subtract 1 Hour

I have this line in a query. I want to subtract 1 hour from ThisMoveTime

 ORDER BY mv4.ThisMoveTime DESC) AS DepartTime
ASKER CERTIFIED SOLUTION
Avatar of Winsen
Winsen
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Anthony Perkins
>> I want to subtract 1 hour from ThisMoveTime<<
In an ORDER BY clause? If so, that does not make any sense. Also, lose the alias "AS DepartTime"
No need to sort by a date minus one hour, the sorting should be the same then date field...
please show the full query...

and explain what you're attempting to do..

 
Avatar of ksenthilraj
ksenthilraj

see when you give dateadd with this mv4.ThisMoveTime, then it will get the value from the expression i.e. minus one hour then only do the order by .. So i think it will work

Cheers
Senthilraj