使用2个字段添加访问时间 [英] Add time in access using 2 fields
本文介绍了使用2个字段添加访问时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个名为[StartTimeOfProduction]的字段(手动输入)
我有一个计算字段,它给出了实际的生产时间。我需要[StartTimeOfProduction](早上6:30格式)然后说[运行时](在几分钟内说29.78)并获得[EndTimeOfProduction]
我一直在网上搜索并且似乎无法找到答案。
感谢您的帮助,
DJRhino
I have a field called [StartTimeOfProduction] (manually enter)
I have a calculated field that gives me the actual production time. I need to take [StartTimeOfProduction](6:30 am Format) and say add [Runtime](in minutes say 29.78) and get a [EndTimeOfProduction]
I have been searching the net and can''t seem to find an answer for this.
Thanks for the help,
DJRhino
推荐答案
嘿DJ,
首先,你有一个有趣的问题。通常,我们知道开始和停止日期/时间,并且必须计算RunTime。你的是朝着相反的方向发展。但是,解决方案将类似。
如果您的RunTime总是在几分钟内,您应该能够使用DateAdd()
解决此问题的功能。你的论点看起来像这样:
Hey DJ,
First, you have an intriguing problem. Usually, we know the start and stop dates/times and have to calculate the RunTime. Yours is going in the opposite direction. However, the solution will be similar.
If your RunTime is always in a number of minutes, you should be able to use theDateAdd()
function to resolve this. Your arguments would look something like this:
展开 | 选择 | Wrap | 行号
我把它作为我的代码:
展开 | 选择 | Wrap | 行号
你在哪里放这个代码?这是在表格上吗?您是从表单后面的VBA模块运行脚本吗?还有什么?
Where are you putting this code? Is this on a Form? Are you running script from a VBA module behind a Form? Something else?
这篇关于使用2个字段添加访问时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文