日期差异公式帮助!!! [英] Date Diff Formula Help!!!

查看:135
本文介绍了日期差异公式帮助!!!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个制定困境,我希望任何人都可以提供帮助。我需要为人员列表做一些报告,以便我知道收费的周年日期。然而,它的工作方式不仅仅是固定的天数。它总是在你的初始日期的同一天下个月。


例如:


如果您成为1/2的客户/ 07,您的日期是2/2/07,即31天。

但如果您在2007年2月2日成为客户,您的周年纪念日将是3/2/07 ,这是30天。


因为不是每个月都有相同的天数,我很难过。


我怎么样?构建公式,这样我每天都可以列出一个列出他们的年代日期的清单。我似乎无法得到一个日期差异公式,使它成为现实。


有人可以帮忙吗?非常感谢。

解决方案


我有一个制定困境,我希望任何人都可以提供帮助。我需要为人员列表做一些报告,以便我知道收费的周年日期。然而,它的工作方式不仅仅是固定的天数。它总是在你的初始日期的同一天下个月。


例如:


如果您成为1/2的客户/ 07,您的日期是2/2/07,即31天。

但如果您在2007年2月2日成为客户,您的周年纪念日将是3/2/07 ,这是30天。


因为不是每个月都有相同的天数,我很难过。


我怎么样?构建公式,这样我每天都可以列出一个列出他们的年代日期的清单。我似乎无法得到一个日期差异公式,使它成为现实。


有人可以帮忙吗?非常感谢。



周年纪念日= DateSerial(年(StartDate)+ 1,月(StartDate)+1,Day(StartDate))


我怀疑这太简单了,第一年就可以了,但是第2年,第3年...... ??

DateSerial函数有解决方案,但我会让你排序!


DateSerial函数是一个非常强大/灵活的函数。我应该看帮助文件条目


MTB


我假设购买''周年纪念日' '你的意思是明年,而不是你指定的下个月!?


我会试着摆弄它。如果您有任何其他复兴,请告诉我。谢谢Mike


srial公式的工作方式。它会在下个月的同一天告诉我这些人。


接下来的问题是,我是否必须为每个月设置12个单独的字段,其标准恰好等于当前的日期,或者我是否可以在每个日期计算它一年?

I''m having a formulating dilemma that I hope anyone can help with. I need to do some reporting for a list of people so I can know there anniversary dates for charging them. However the way it works isn''t just on fixed number of days. its always the next month on the same day of your intial date.

For Example:

If you became a customer on 1/2/07, your annivesary date would be 2/2/07, which is 31 days.
But if you became a customer on 2/2/07, your anniversary date would be 3/2/07, whichh is 30 days.

Since not every month has the same numbers of days, I''m stumped.

How would I construct the formula so I could pull a list each day of who has hit their annivesary date. I can''t seem to get a date diff formula that makes it happen.

Can anyone help with this? It would be much appreciated.

解决方案

I''m having a formulating dilemma that I hope anyone can help with. I need to do some reporting for a list of people so I can know there anniversary dates for charging them. However the way it works isn''t just on fixed number of days. its always the next month on the same day of your intial date.

For Example:

If you became a customer on 1/2/07, your annivesary date would be 2/2/07, which is 31 days.
But if you became a customer on 2/2/07, your anniversary date would be 3/2/07, whichh is 30 days.

Since not every month has the same numbers of days, I''m stumped.

How would I construct the formula so I could pull a list each day of who has hit their annivesary date. I can''t seem to get a date diff formula that makes it happen.

Can anyone help with this? It would be much appreciated.

Anniversary date = DateSerial(Year(StartDate)+1,Month(StartDate)+1, Day(StartDate))

I suspect that is too simple, OK for year one but years 2, 3 ... ??
The DateSerial function has the solution, but I will let you sort that!

DateSerial function is a very powerful/flexible function. I should look at the help file entry

MTB

edit
I have assume buy ''anniversary'' you do mean the next year, as opposed to the next month you have indicated!?


I''ll try to fiddle with it. Let me know if you have any other revalations. Thank you Mike


The srial formula worked sort of. It will show me the people on the same day next month.

Next question being, will I have to set up 12 separate fields for each month with a criteria that just equals the current days date, or can I get it to calculate it daily throughout the year?


这篇关于日期差异公式帮助!!!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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