在sqlserver 2005中插入日期 [英] inserting date in sqlserver 2005

查看:80
本文介绍了在sqlserver 2005中插入日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hai,有人可以告诉我如何使用日期时间选择器在sqlserver的日期时间字段中分别插入日期和时间.

hai,can anybody please tell me how to insert date and time separately in datetime fields in sqlserver using datetime picker.

推荐答案

CSharp时间帮助
检查这些 [
CSharp Time Help
Check these[^]


AFAIK您不能仅插入date或仅插入timedatetime字段中.
您只能基于
字符串格式 [
AFAIK You cannot insert only date or only time in a datetime field.
You can display only time or date based on string formats[^] in front end.


CONVERT(TIME(0),GETDATE()) AS HourMinuteSecond,
CONVERT(DATE,GETDATE(),101) AS DateOnly


这篇关于在sqlserver 2005中插入日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆