在SqlServer 2005中存储的TimeSpan值 [英] Stored TimeSpan Values in SqlServer 2005

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

问题描述

你好,
我有一些TimeSpan类型的C#属性.我需要将此TimeSpan值存储在SQL Server 2005数据库中.我知道SQL Server 2008具有时间数据类型.但是,因为我使用的是SQL Server 2005,所以我不确定哪种数据类型是用于存储TimeSpan值的最佳数据类型.
有人可以告诉我使用TimeSpan值的最佳类型吗?
谢谢

Hello,
I have some a C# property of type TimeSpan. I need to store this TimeSpan value in a SQL Server 2005 database. I know that SQL Server 2008 has the time data type. However, because I am using SQL Server 2005, I am not sure which data type is the best one to use to store a TimeSpan value in.
Can someone please tell me the best type to use for a TimeSpan value?
Thank you

推荐答案

您可以使用longInt,只存储TimeSpan.Ticks属性.
You could use a longInt, and just store the TimeSpan.Ticks property.


我的朋友
我在那里输入约会时间,我只想让我的时间分开她吗?我该怎么办?
my freind
I type a date time there and I just want my time separating her do? How can I do this will make


这篇关于在SqlServer 2005中存储的TimeSpan值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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