RDLC报告中的时间格式 [英] Time format in RDLC report
本文介绍了RDLC报告中的时间格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$ b $我从我的Db表时间栏中得到'时间数据',如'09:22:74.5300000'
我怎样才能使它成为hh:mm:ss在rdlc报告栏中
i已应用格式栏为hh:mm :ss,但它显示为'09:22:74.5300000'。 。 。 :@
我怎么能摆脱这个?
i am getting 'time data' from One of my Db table time column like this '09:22:74.5300000'
How can i make it to only hh:mm:ss in rdlc report column
i already applied format column as hh:mm:ss , but it is showing like '09:22:74.5300000' . . . :@
how can i get out of this ?
推荐答案
假设这是一个字符串字段,具有非常基本的错误处理:
Assuming that this is a string field, with very basic error handling:
public string FormatTime(string toFormat)
{
var temp = toFormat.Split(new[] {'.'}, StringSplitOptions.None);
return (temp.Count >0) ? temp[0] : string.Empty;
}
这篇关于RDLC报告中的时间格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文