计算天数! [英] Calculating days!

查看:62
本文介绍了计算天数!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,很高兴来到这里......我正在努力计算发票系统中的天数......好的...日期字段有两种......一种是发票开始日期和结束日期..另一个是合同开始日期和结束日期......我必须根据所涉及的日期计算收费天数......
假设INVOICE开始日期: 01-01- 07; INVOICE结束日期: 31-01-07

条件是:


1.如果合同开始日期是BEFORE(< =)发票开始日期和合同结束日期是AFTER(> =)或等于发票结束日期然后使用发票开始和结束日期进行计算。


2.如果合同开始日期是AFTER(>),则发票开始日期和合同结束日期是发票结束日期之前(<),然后使用合同开始日期和合同结束日期进行计算。


3.如果合同开始日期是AFTER(>),则发票开始日期和合同开始日期是BEFORE(<)发票结束日期那么使用合同开始日期和发票结束计算日期。


4.如果合同开始日期是BEFORE(<),发票开始日期和合同结束日期也是发票结束日期之前(<)那么使用发票开始日期和合同结束日期进行计算。


5.如果合同开始日期是发票结束日期之后(>),则不显示记录。


6.如果合同结束日期是发票开始日期之前(<),则不显示记录。


我知道吗?有点令人讨厌,对我而言是:P ......好吧,它已经工作了3天,我对Access并不是很熟悉。 ..任何形式的帮助将不胜感激...提前感谢你们...

解决方案


你好伙计们,很高兴来到这里...我正在努力计算发票系统中的日子......好吧......日期字段有两种......一种是发票开始日期和结束日期...另一种是合同开始日期和结束日期......我必须根据所涉及的日期计算收费天数......
假设INVOICE开始日期: 01-01-07; INVOICE结束日期: 31-01-07

条件是:


1.如果合同开始日期是BEFORE(< =)发票开始日期和合同结束日期是AFTER(> =)或等于发票结束日期然后使用发票开始和结束日期进行计算。


2.如果合同开始日期是AFTER(>),则发票开始日期和合同结束日期是发票结束日期之前(<),然后使用合同开始日期和合同结束日期进行计算。


3.如果合同开始日期是AFTER(>),则发票开始日期和合同开始日期是BEFORE(<)发票结束日期那么使用合同开始日期和发票结束计算日期。


4.如果合同开始日期是BEFORE(<),发票开始日期和合同结束日期也是发票结束日期之前(<)那么使用发票开始日期和合同结束日期进行计算。


5.如果合同开始日期是发票结束日期之后(>),则不显示记录。


6.如果合同结束日期是发票开始日期之前(<),则不显示记录。


我知道吗?有点令人讨厌,对我而言是:P ......好吧,它已经工作了3天,我对Access并不是很熟悉。 ..任何形式的帮助将不胜感激...提前感谢你们...



我会在一两天内发布解决方案我有机会参与其中。





如果我理解正确的话,我认为这可能是想要的东西

展开 | 选择 | Wrap | 行号






如果我理解正确的话,我认为这可能是想要的东西

展开 | 选择 | Wrap | 行号


Hi guys, good to be here... I am struggling to calculated days in invoice system...Ok...The dates fields are of two kinds...One is the invoice start date and end date... The other one is the contract start date and end date...I have to calculate days of charging according to the dates involved...
Suppose INVOICE start date: 01-01-07; INVOICE end date: 31-01-07

Conditions are:

1. IF the contract start date is BEFORE(<=) the invoice start date AND contract end date is AFTER(>=) or equal to invoice end date THEN use the invoice start and end dates for calculation.

2. IF contract start date is AFTER(>) the invoice start date AND contract end date is BEFORE (<) the invoice end date THEN use contract start date and contract end date for calculation.

3. IF contract start date is AFTER(>) the invoice start date AND contract start date is BEFORE (<) the invoice end date THEN use contract start date and invoice end date for calculation.

4. IF contract start date is BEFORE(<) the invoice start date AND contract end date is also BEFORE (<) the invoice end date THEN use Invoice start date and contract end date for calculation.

5. IF contract start date is AFTER (>) the invoice end date THEN do not show the record.

6. IF contract end date is BEFORE (<) the invoice start date THEN do not show the records.

I know it?s a bit of nuisance, to me it is :P... Well it?s been 3 days working on it and I am not that much familiar with Access... Any kind of help will be appreciated... Thanking you guys in advance...

解决方案

Hi guys, good to be here... I am struggling to calculated days in invoice system...Ok...The dates fields are of two kinds...One is the invoice start date and end date... The other one is the contract start date and end date...I have to calculate days of charging according to the dates involved...
Suppose INVOICE start date: 01-01-07; INVOICE end date: 31-01-07

Conditions are:

1. IF the contract start date is BEFORE(<=) the invoice start date AND contract end date is AFTER(>=) or equal to invoice end date THEN use the invoice start and end dates for calculation.

2. IF contract start date is AFTER(>) the invoice start date AND contract end date is BEFORE (<) the invoice end date THEN use contract start date and contract end date for calculation.

3. IF contract start date is AFTER(>) the invoice start date AND contract start date is BEFORE (<) the invoice end date THEN use contract start date and invoice end date for calculation.

4. IF contract start date is BEFORE(<) the invoice start date AND contract end date is also BEFORE (<) the invoice end date THEN use Invoice start date and contract end date for calculation.

5. IF contract start date is AFTER (>) the invoice end date THEN do not show the record.

6. IF contract end date is BEFORE (<) the invoice start date THEN do not show the records.

I know it?s a bit of nuisance, to me it is :P... Well it?s been 3 days working on it and I am not that much familiar with Access... Any kind of help will be appreciated... Thanking you guys in advance...

I will post the solution in a day or two, as soon as I get the opportunity to work on it.


Hi

I think this might be something like what tou want, if I understant it correctly

Expand|Select|Wrap|Line Numbers


Hi

I think this might be something like what tou want, if I understant it correctly

Expand|Select|Wrap|Line Numbers


这篇关于计算天数!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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