# Miscellaneous > Ask an Expert >  datediff  (today - date)  for MS SQL

## anselme

Hello

for MS SQL 2000 

I want to return the number of days between  a date in the database and today

something like


```
SELECT user.fName,
 user.lName & " (" & (datediff(now - user.lastVisit))  & " )" 
FROM  user
```

I must return

 John Turner (38)

where 38 are the days between last visit and now

thank you

----------


## MAK

select fname,lname, datediff(yy,hire_date,getdate()) as YearsofService from pubs..employee

----------


## anselme

it works  (with dd) thank you

----------


## gbshashi

Hi,
Try this query

SELECT CAST(LNAME AS VARCHAR(50)) + '(' + CAST(DATEDIFF(DD,LASTVISIT,GETDATE()) AS VARCHAR(3)) + ')' FROM USER

----------

