共享点列表:捕获开始时间,结束时间和时差的列 [英] Sharepoint List: Column tocapture start time, End Time and Time difference

查看:95
本文介绍了共享点列表:捕获开始时间,结束时间和时差的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想创建一个表格来捕获每个活动的开始时间和结束时间,并以hh:mm:ss格式自动计算时差.

I want to create a form to capture start time and end time for each activity and auto calculate time difference in hh:mm:ss format.

设置规则的方式和方式,以便如果可以点击开始",按钮,它捕获系统日期和时间,并且在单击结束"按钮时捕获系统日期和时间.再按一次,它应该捕获系统日期和时间.另外,系统应自动计算时差 并且应该在持续时间"列中显示.

What and how to set the rules so that if one can click on "start" button, it captures system date and time and while clicking on "end" button again it should capture system date and time. Also, system should autocalculate time difference and it should show in time duration column.

我尝试在InfoPath中创建表单,并创建了一个规则,即如果我选择开始",则选择开始时间".列应捕获系统时间.同样,我也为结束时间设定了规则.现在,在填写表格时,当我选择开始"时, 它正在捕获系统日期和时间,但是在单击保存时,开始和结束时间将更新为我单击保存"时的时间.如何避免呢?

I tried creating form in InfoPath and created a rule that if I select "start' then "start time" column should capture system time. Similary I set a rule for end time as well. Now, while filling up the form, when I am selecting "start", it is capturing system date and time however while clicking on save, start and end time is getting updated to time when I clicked on "Save". How to avoid it?

此外,我该如何计算结束时间和开始时间之间的时差.

Also, how can I calculate time difference between End time and Start time. 

感谢您在这方面的帮助.预先感谢!

I would appreciate your help with this regard. Thanks in advance!

 

推荐答案

是的,我可以在自己的环境中重现此场景.这是SharePoint中的一个已知问题.

似乎此问题是由于在InfoPath中设置了now()字段中的值时,InfoPath节省了向SharePoint提交表单时的实时性.规则.

作为解决方法,您可以创建自定义解决方案.您需要在EditForm/NewForm页面中添加开始/结束按钮,并通过编码设置StartTime/EndTimer列值.

如何在EditForm页面中创建按钮供您参考:

如何更新列表项:

如何获取当前时间:

谢谢

王恩(Dean Wang)


这篇关于共享点列表:捕获开始时间,结束时间和时差的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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