如何在我的Asp.Net中的Sql中使用时间(7) [英] How Do I Use Time(7) In Sql In My Asp.Net

查看:84
本文介绍了如何在我的Asp.Net中的Sql中使用时间(7)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 sql server 2012 的数据库中有一个列,他的类型是 时间(7)

我想在 asp.net 中使用它,但我不知道如何。!!



i想从这个时间小时分钟

i have a column in database in sql server 2012 that his type is Time (7)
and i want to use it in asp.net but i don't know how.!!

i want from this Time the hours and minutes.

推荐答案

这两篇文章将向您展示如何将SQL时间数据类型映射到.NET数据类型...

http://msdn.microsoft.com/en- us / library / ms131092.aspx [ ^ ]

http://msdn.microsoft.com/en -us / library / bb675168.aspx [ ^ ]
These two articles are show you how to map SQL time data type to .NET data type...
http://msdn.microsoft.com/en-us/library/ms131092.aspx[^]
http://msdn.microsoft.com/en-us/library/bb675168.aspx[^]


参考: http:// msdn .microsoft.com / EN -us / library / bb675168.aspx [ ^ ]

for sql server时间,匹配C#.NET Framework类型是TimeSpan

如果检查TimeSpan属性,则可以获得所需的值 [ ^ ]
refer : http://msdn.microsoft.com/en-us/library/bb675168.aspx[^]
for sql server Time, matching C# .NET Framework type is TimeSpan
if you check the TimeSpan properties you can get the values you want [^]


这篇关于如何在我的Asp.Net中的Sql中使用时间(7)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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