在InfoPath 2010中计算日期时间差(以小时为单位) [英] Calculate Date Time Difference in Hours in InfoPath 2010

查看:186
本文介绍了在InfoPath 2010中计算日期时间差(以小时为单位)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在寻找一种方法来获取2个日期时间字段之间的差异,以小时为单位。第一个开始时间是日期时间字段,其默认值为now(),而结束时间也是计算字段。当表单结束其工作流程过程时,将填充结束时间字段。即开始时间选择发起人打开表格的时间,而结束时间选择最终批准时的当前时间。



请帮助我如何解决这两个领域之间的区别。



我已按照此博客上的步骤操作,但我在StartTime和EndTime上都获得了NaN值字段。



http://blogs.msdn.com/b/infopath/archive/2007/02/21/calculating-elapsed-time-without-code.aspx?PageIndex=3 [ ^ ]



请帮助我了解如何区分这两个字段。



谢谢。



第2部分问题



你好,这次差异对于在同一天持续的活动,erence非常适合。我的客户要求进行2天的时间计算,例如如果任务(数据库备份)在2015年4月30日星期四晚上9点开始,到2015年5月1日星期五上午9点结束。



关于我如何实现这个的任何想法? />


谢谢。

I'm currently looking for a way to get the difference between 2 date time fields in hours. The first "Start Time" is a date time field with its default value as now() while the "End time" is a also a calculated field. The "end time" field is to be populated when the form has concluded its workflow process. i.e. "Start time" picks the time the form is opened by the initiator while "end time" picks the current time as at time of final approval.

Kindly assist on how I go about getting the difference between these two fields.

I have followed the steps on this blog but I get a "NaN" value on both the StartTime and EndTime fields.

http://blogs.msdn.com/b/infopath/archive/2007/02/21/calculating-elapsed-time-without-code.aspx?PageIndex=3[^]

Kindly assist on how I go about getting the difference between these two fields.

Thanks.

Part 2 Question

Hi, this time difference works perfectly for activities that last within the same day. My client has requested for a time calculation that will span across 2 days e.g. if a task(db backup) starts 9pm on Thursday 30th April 2015 and ends 9am on Friday 1st of May 2015.

Any ideas on how I implement this?

Thanks.

推荐答案

看看这里:

计算没有自定义代码的InfoPath中的时间差异 [ ^ ]

计算经过时间......没有代码! [ ^ ]
Have a look here:
Calculating Time Differences in InfoPath Without Custom Code[^]
Calculating Elapsed Time…without code![^]


这篇关于在InfoPath 2010中计算日期时间差(以小时为单位)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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