如何在查询中添加totaltime = [hh:mm:ss] + [hh:mm:ss] [英] how add totaltime = [hh:mm:ss] + [hh:mm:ss] in query

查看:107
本文介绍了如何在查询中添加totaltime = [hh:mm:ss] + [hh:mm:ss]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在查询中添加(longtime)totaltime = [hh:mm:ss] + [hh:mm:ss];

i也需要能够添加超过24小时但它仍然可以以这种格式显示

ie(hh:mm:ss)31:10:20 = 31hrs 10min 20秒

请帮助

how add (longtime) totaltime = [hh:mm:ss] + [hh:mm:ss] in query;
i need to be able to add more than 24hrs also but it can still show in this format
ie (hh:mm:ss) 31:10:20 = 31hrs 10min 20sec
pls help

推荐答案

你只需将它们加在一起。


背景如此之少关于你正在使用什么的信息或任何形式的解释我没有什么可进一步的。
You just add them together.

With so little background information or any sort of explanation about what you''re working with I have nothing to go further with.


时间和日期存储为数字,小数部分作为时间,并且整数部分作为日期。将0.75(下午6:00:00)添加到0.5(中午)会产生1.25。格式化,无论是长时间还是短时间或任何其他格式应用于以有意义的形式显示存储的数据(数字)。

在查询中添加两次就像NeoPa建议的那样,只需添加它们。

当总小时数超过24时,Access没有内置格式显示时间为小时/分钟/秒,即小数部分总和大于1的值。因此,这个将要求用户函数接受一个长数字作为参数。

此函数将返回''31小时10分20秒'或''4239小时0分0秒''或任何其他有效小时/分钟/秒作为一个字符串。

请记住,您正在处理查询中存储时间的方式,以及您在显示时希望格式化时间的方式。


OldBirdman
Times and dates are stored as numbers, with the fractional part as the time, and the integer part as the date. Adding 0.75 (6:00:00PM) to 0.5(Noon) results in 1.25. Formatting, whether longtime or shorttime or any other formatting is applied to display the stored data (number)in a meaningful form.
Adding two times in a query is as NeoPa suggests, just add them.
Access does not have a built-in format for displaying time as hours/minutes/seconds when the total hours exceeds 24, which is when the fractional parts sum to a value greater than 1. Therefore, this will require a user function to accept as a parameter a long number.
This function would return ''31hrs 10min 20sec'' or ''4239hrs 0min 0sec'' or ANY other valid hrs/min/sec as a string.
Remember, you are dealing with the way times are stored in the query, and the way you want the times formatted when shown.

OldBirdman


这就是我得到的

TotalTime:[MultidayOneQ.Racetime] + [MultidayTwoQ.Racetime]

IDNo --- -------- Day1 ------- Day2 -------- TotalTime

7805085171085 --01:09:47 --- 01:10:09 ----- 01:09:4701:10:09

i通过在两个单独的查询中过滤racetimingT获得Day1和Day2结果(使用1或2链接到一天,这是在比赛时添加的etup)。然后在另一个查询中,我将每天的IDNo链接到骑车人表中的IDNO。这是我可以让记录从垂直到水平显示的唯一方式。在一个查询中,每天分开


我添加---在空格中
this is what i get
TotalTime:[MultidayOneQ.Racetime]+[MultidayTwoQ.Racetime]
IDNo -----------Day1------- Day2--------TotalTime
7805085171085 --01:09:47---01:10:09-----01:09:4701:10:09

i get the Day1 and Day2 results by filtering the racetimingT in two separate queries (using a 1 or 2 linked to a day, that is added when race is setup). then In another query i link each day''s IDNo to the IDNO from the cyclist table. This is only way i can get the records to display from "vertical to horizontal" in a query and separated per day

i added --- in the spaces


这篇关于如何在查询中添加totaltime = [hh:mm:ss] + [hh:mm:ss]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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