Problem with date

  • Thread starter Thread starter Laura K
  • Start date Start date
L

Laura K

Hi I am making the switch from Access to SQL server and I can not make one
of my queries work. Can you give me some idea on how to do this?

I need to have a countdown from today's date to a future date. I am using
the DateDiff but I am getting a negative number when I need a positive. How
can I switch my negative to positive and vice versa. Of course multiplying
by -1 would work but I have no idea how to add that. I am working in a
view. Is this the way to go?

Here is the SQL

SELECT LauraK.tblTracker.*, DATEDIFF(DAY, CruiseDate, GETDATE()) AS Expr1
FROM LauraK.tblTracker

This gives me that correct DATEDIFF but like I said I need negative to be
positive and positive to be negative.

Any help appreciated
Laura K
 
Back
Top