Microsoft
Software
Hardware
Network
Question : Help on calculating days in SQL script
The following script:
select (convert(numeric(17,2),dat
ediff(y,st
rtdate,get
date()))) from table
where the column strtdate value is 7/13/1988, the result that gives is:
8031.00 days
However, when I use Excel to cal the difference between 7/13/1988 and 7/9/2010, that value is 8030.00 days
Am I missing something from my script? I have to compare the SQL results with the Excel result and they are different
Answer : Help on calculating days in SQL script
I ran that in Excel 2007, and it worked fine :)
Are you regional settings for dates set at m/d/yyyy (as mine are), or d/m/yyyy?
BTW, I get the same answer if I use =TODAY()-"13 Jul 1988"
Random Solutions
Column border style problem
well vs borewell
Having problems getting my VOIP setup working?
error when calling php/xml file in browser
How can I run my PC in safe mode?
Error string in catch block?
Can I use server scripts with iPad?
Spell check two languages at the same time
Word 2002/xp: Error Message: "Run-time error '4248'; 'This command is not available because no document is open.'"
mcafee 4.5 issue cant see the agent logs