SqlDateTime 溢出.必须介于 1/1/1753 12:00:00 AM 和 12/31/9999 11:59:

larenzhuanyong22022-10-04 11:39:541条回答

SqlDateTime 溢出.必须介于 1/1/1753 12:00:00 AM 和 12/31/9999 11:59:59 PM 之间,应怎么解决?
SqlDateTime 溢出.必须介于 1/1/1753 12:00:00 AM 和 12/31/9999 11:59:59 PM 之间.

已提交,审核后显示!提交回复

共1条回复
ystc 共回答了17个问题 | 采纳率94.1%
9999改小一点
1年前

相关推荐

计算时间差先定义个DateTime t=DateTime.Now;怎么求出t 减去60天的DateTime t1 呢
在oo公1年前1
大鱼fff 共回答了14个问题 | 采纳率85.7%
获得当前时间 n 天后的日期时间
DateTime newDay = DateTime.Now.AddDays(int n);
-n 代表 n天前
n 代表n天后的
DateTime newDay = DateTime.Now.AddDays(-60);
The conversion of a char data type to a datetime data type r
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
The statement has been terminated.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

在本地上运行没问题.但发布到服务器上之后就出现了这样的问题,这是为什么呢?

hollypillow1年前1
福间 共回答了17个问题 | 采纳率82.4%
获取时间用这个.DateTime.Now.ToString("d")
在c#中,如何实现计算DateTime a与DateTime b两个日期间相距的天数?
小小小刀客1年前1
天娱调查员 共回答了16个问题 | 采纳率93.8%
DateTime time1 =new DateTime(1982,4,24,14,23,06);
DateTime time2 =new DateTime(1982,1,21,8,16,32);
TimeSpan ts= time2.Subtract(time1);
string timespan = "相差:"
+ts.Days.ToString()+"天"
+ts.Hours.ToString()+"小时"
+ts.Minutes.ToString()+"分钟"
+ts.Seconds.ToString()+"秒";
一个语句看不明白,..DateTime dt;dt = DateTime.Now;DateTime dat = Conv
一个语句看不明白,..
DateTime dt;
dt = DateTime.Now;
DateTime dat = Convert.ToDateTime("12/12/1983");
Response.Write(dt.Year.GetType() + "
");
在上面的语句里,DateTime dat = Convert.ToDateTime("12/12/1983");这句是什么意思?为什么我写成("12/12/83");就不行?
要是写成("12-12-1983");的形式呢?
这句话有什么用呢?
天冷没钱买yy1年前1
Eleven-joy 共回答了25个问题 | 采纳率96%
DateTime dat = Convert.ToDateTime("12/12/1983");
把12/12/1983一个字符串转化成日期格式给DateTime dat
写成83不行是因为这个函数的标准格式就是这样.
我哪知道你这句在这个程序中是用来做什么的,我们只能从你提供的代码中解释这句的意思.它就是把12/12/1983一个字符串转化成日期格式给DateTime dat.就是得到一个时间格式的时间数据罢了
PB时间段查询string chengbadatetime day_startdatetime day_endday_s
PB时间段查询
string chengba
datetime day_start
datetime day_end
day_start=datetime(date(em_1.text),time("00:00:00"))
day_end=datetime(date(em_2.text),time("23:59:29"))
chengba="t_mat_outbill_mo_outputdate>='"+string(day_start)+"' and (t_mat_outbill_mo_outputdate
22ocLa85oe93b2c1年前1
浮桥烟锁 共回答了19个问题 | 采纳率94.7%
这一句:
chengba="t_mat_outbill_mo_outputdate>='"+string(day_start)+"' and (t_mat_outbill_mo_outputdate=datetime('"+string(day_start)+"')) and (t_mat_outbill_mo_outputdate
请问英语中简写的BU是什么意思DateTimeUser NameBUMobile PhoneLocation of pr
请问英语中简写的BU是什么意思
Date
Time
User Name
BU
Mobile Phone
Location of problem
User Interface:Outlook / Outlook Anywhere / OWA (Choose One)
What is the speed of connecting to Miracle at the same time :Failed / Normal Speed / Very Slow
What is the speed of connecting to a common internet web site :Failed / Normal Speed / Very Slow
Name of other applications running on PC:(Collect program names)
taotao_cj1年前3
今生wu悔 共回答了18个问题 | 采纳率94.4%
应该是你公司的电脑出问题了你喊人来修填的表对吧?
BU=business unit,填写你所在的部门
VFP,求详解13、\x05在下列有关VFP表达式中,语法上错误的是 C .\x05A.DATETIME()+100 \
VFP,求详解
13、x05在下列有关VFP表达式中,语法上错误的是 C .
x05A.DATETIME()+100 x05B.DATE()-1000
x05C.DATETIME()-DATE() x05D.DTOC(DATE())-DTOC(DATETIME())
枉凝眉海边一粒沙1年前1
寻找原来的世界 共回答了18个问题 | 采纳率94.4%
C错误的原因是用两个不同类型的数据相减,在VFP里面是不允许的,DATETIME()是日期时间型数据,DATE()是日期型数据.
其它的都是正确的,如,DATETIME()+100是在当前时间下加上100秒后的时间.
我在C#里面定义了两个datetime类型的数据d1,d2现在我想计算两者之间相差多少天,并将其转化成整形类型day
caimao0011年前1
qm321 共回答了17个问题 | 采纳率94.1%
static void Main(string[] args)
{
DateTime dt1 = new DateTime(2009,9,30);
DateTime dt2 = new DateTime(2008,9,20);
TimeSpan ts =dt1 - dt2;
Console.Write("相隔的天数是"+ ts.Days);
}
The conversion of a char data type to a datetime data type r
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime
HDHCGG1年前1
qidan129 共回答了9个问题 | 采纳率88.9%
获取时间用这个.DateTime.Now.ToString("d")