2011-12-21 59 views
0

我为我的应用程序使用了xaf和xpo。 我有时间跨度场时间:为TimeSpan节省时间并解析它

private TimeSpan showTime; 

public TimeSpan ShowTime 
{ 
    get { return showTime; } 
    set { SetPropertyValue("ShowTime", ref showTime, value); } 
} 

在节省像float数据库。
在应用程序(由DevExpress生成)中,时间通常显示为:22:00:00,如下表所示:79200 在另一个项目中,我从该列加载数据,但无法解析它。

<li><a href="#"><%=TimeSpan.Parse(schedule.ShowTime.Value.ToString()) %></a></li> 

我有:79200.00:00:00

如何正确地解析?
谢谢。

回答

2

如果schedule.ShowTime.Value的类型是这是几秒钟的量,你需要使用FromSeconds方法:

<%=TimeSpan.FromSeconds(schedule.ShowTime.Value) %> 
+0

该死的,非常感谢。 – user348173 2011-12-21 11:51:17