更新时间:2023-01-28 12:01:51
如果使用的是SQL Server,请查看转换函数 ^ ].
查看日期和时间样式(尤其是代码101).
If are using SQL server, have a look at the Convert function documentation[^].
Look at date and time styles (especially code 101).
您可以仅传递DateTime对象中的日期-它是一个属性.
You can pass just the date from a DateTime object - it''s a property.
DateTime dt = DateTime.Now;
CallMySql(dt.Date);
从ABC中选择*其中convert(varchar(10),TDate,103)如``09/01/2009''
103 = dd/MM/yyyy
Select * from ABC Where convert(varchar(10),TDate,103) like ''09/01/2009''
103=dd/MM/yyyy