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
HP z200 Workstation Windows 2008 R2 'PCI serial port' driver and 'PCI Simple Communications controller' driver needed
New Windows 7 workstations in existing SBS 2003 domain
OCS 2007 R2 and Cisco call manager
Exchange Mail Problem
Difference between Icefaces,myfaces,richfaces
in JSF?
Windows Update Error on Hyper-V guest on a HP Proliant ML370 G6 (NC375i network card)
Block Logme internally
Trimming the beginning and end of a string
Reset Root Password on a MAC
How convert this c++ code to csharp