在报告日期显示时间 [英] On Report date is displayed with time

查看:111
本文介绍了在报告日期显示时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VB 2008创建Windows表单应用程序。我使用表单来存储计划信息。scheduleddate列只显示数据网格视图中的日期。然后我为该表单创建了报表并将其显示在Windows报告查看器。报告
,  scheduleddate列也显示默认时间....如何解决此问题

I am using VB 2008 to create windows form application.I have used a form to store the schedule information.the scheduleddate column displays only date in data grid view.Then I created report for that form and displayed it in Windows Report Viewer .On report ,  scheduleddate column displays default time also....How to resolve this

这是我的FrmSchedule的屏幕截图:

This is the screenshot of my FrmSchedule:

您可以查看预定的日期和时间

You can see scheduled date and time

这是我的ReportSchedule的屏幕截图:

This is the screenshot of my ReportSchedule :

我想要预定日期和预定时间在这里显示,因为它显示在数据网格视图中...请帮帮我

I want scheduled date and scheduled time to be displayed here as it is displayed in data grid view...Please help me

推荐答案

什么是您的RDLC文件数据?

What is your datasoure of RDLC file?

也许您应该将日期时间字符串拆分为以下代码。

Maybe you should split the datetime string as below code.

            string datetime = @"1/6/2017 12:00:00 AM";
            string[] arr = datetime.ToString().Split(' ');
            date.Text = arr[0] ;
            time.Text = arr[1]+ arr[2];

希望它对您有所帮助。

最好的问候,

Bob





这篇关于在报告日期显示时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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