Problem with 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top