Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya
You last visited: Today at 05:48

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Datediff

Discussion on Datediff within the Shaiya forum part of the MMORPGs category.

Reply
 
Old   #1
 
pardilias's Avatar
 
elite*gold: 0
Join Date: May 2015
Posts: 149
Received Thanks: 35
Datediff

Hi ,
here is my problem
Microsoft SQL server 2008 R2


PHP Fatal error: Uncaught PDOException: SQLSTATE[22003]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The datediff function resulted in an overflow. The number of dateparts separating two date/time instances is too large. Try to use datediff with a less precise datepart.


Thanks for your help
pardilias is offline  
Old 05/14/2024, 15:17   #2
 
512nil's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 35
Received Thanks: 1
This error occurs because the DATEDIFF function in SQL Server is attempting to calculate the difference between two dates with a very high precision, which results in an overflow. The solution is to use a less precise datepart to calculate the difference between the dates.

For example, if you are trying to calculate the difference between two dates in years, months, or days, you can use YEAR, MONTH, or DAY as dateparts, respectively. This will reduce the precision of the difference and avoid the overflow.
512nil is offline  
Reply




All times are GMT +2. The time now is 05:54.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.