469,085 Members | 1,045 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,085 developers. It's quick & easy.

Set int count from datediff(day)

196 100+
i got an int @count
i want to set it to the number of day differences in sql, i tried

Expand|Select|Wrap|Line Numbers
  1. @count = datediff(day,min(date),max(date))
even tried to cast datediff to int but it doesn't work, any suggestions?
Oct 22 '10 #1
1 2568
32,158 Expert Mod 16PB
The first parameter should be a short string. What you have is not valid. I expect 'd' would do it for you, but see DATEDIFF (Transact-SQL) for the full story.
Oct 22 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Lauren Quantrell | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.