0

嗨所以我有一个只有 2 列的预订日期的表格......国家和预订每个国家只能在一天预订。周一至周五,第二列中表示“日”。是否可以根据今天计算下一个时段是什么:(基于表中的日期)但如果今天是星期一并且时段是星期一,它将显示下星期一的日期等....

所以基本上今天(星期三)我需要一个计算来检查下一个可用预订是什么并显示日期:所以如果文件中的下一个是星期四,我需要它显示 14/03/2019 如果文件中是星期三我会需要它在下周显示,因为今天太晚了,所以 20/03/2019

4

1 回答 1

0

万一有人在寻找同样的东西......我已经让它工作了......也许不是最漂亮的解决方案,但工作......

= If [v Next Dry]="Monday" And DayName(CurrentDate()) ="Monday" Then RelativeDate(CurrentDate();7) ElseIf [v Next Dry]="Monday" And DayName(CurrentDate()) ="星期二” 然后 RelativeDate(CurrentDate();6) ElseIf [v Next Dry]="Monday" And DayName(CurrentDate()) ="Wednesday" Then RelativeDate(CurrentDate();5) ElseIf [v Next Dry]="Monday " And DayName(CurrentDate()) ="Thursday" Then RelativeDate(CurrentDate();4) ElseIf [v Next Dry]="Monday" And DayName(CurrentDate()) ="Friday" Then RelativeDate(CurrentDate();3 ) ElseIf [v Next Dry]="Monday" And DayName(CurrentDate()) ="Saturday" Then RelativeDate(CurrentDate();2) ElseIf [v Next Dry]="Monday" And DayName(CurrentDate()) ="星期日”然后是相对日期(当前日期();1)

ElseIf [v Next Dry]="Tuesday" And DayName(CurrentDate()) ="Monday" Then RelativeDate(CurrentDate();1) ElseIf [v Next Dry]="Tuesday" And DayName(CurrentDate()) ="Tuesday " Then RelativeDate(CurrentDate();7) ElseIf [v Next Dry]="Tuesday" And DayName(CurrentDate()) ="Wednesday" Then RelativeDate(CurrentDate();6) ElseIf [v Next Dry]="Tuesday" And DayName(CurrentDate()) ="Thursday" Then RelativeDate(CurrentDate();5) ElseIf [v Next Dry]="Tuesday" And DayName(CurrentDate()) ="Friday" Then RelativeDate(CurrentDate();4) ElseIf [v Next Dry]="Tuesday" And DayName(CurrentDate()) ="Saturday" Then RelativeDate(CurrentDate();3) ElseIf [v Next Dry]="Tuesday" And DayName(CurrentDate()) ="Sunday "然后RelativeDate(CurrentDate();2)

ElseIf [v Next Dry]="Wednesday" And DayName(CurrentDate()) ="Monday" Then RelativeDate(CurrentDate();2) ElseIf [v Next Dry]="Wednesday" And DayName(CurrentDate()) ="Tuesday " Then RelativeDate(CurrentDate();1) ElseIf [v Next Dry]="Wednesday" And DayName(CurrentDate()) ="Wednesday" Then RelativeDate(CurrentDate();7) ElseIf [v Next Dry]="Wednesday" And DayName(CurrentDate()) ="Thursday" Then RelativeDate(CurrentDate();6) ElseIf [v Next Dry]="Wednesday" And DayName(CurrentDate()) ="Friday" Then RelativeDate(CurrentDate();5) ElseIf [v Next Dry]="Wednesday" And DayName(CurrentDate()) ="Saturday" Then RelativeDate(CurrentDate();4) ElseIf [v Next Dry]="Wednesday" And DayName(CurrentDate()) ="Sunday "然后RelativeDate(CurrentDate();3)

ElseIf [v Next Dry]="Thursday" And DayName(CurrentDate()) ="Monday" Then RelativeDate(CurrentDate();3) ElseIf [v Next Dry]="Thursday" And DayName(CurrentDate()) ="Tuesday " Then RelativeDate(CurrentDate();2) ElseIf [v Next Dry]="Thursday" And DayName(CurrentDate()) ="Wednesday" Then RelativeDate(CurrentDate();1) ElseIf [v Next Dry]="Thursday" And DayName(CurrentDate()) ="Thursday" Then RelativeDate(CurrentDate();7) ElseIf [v Next Dry]="Thursday" And DayName(CurrentDate()) ="Friday" Then RelativeDate(CurrentDate();6) ElseIf [v Next Dry]="Thursday" And DayName(CurrentDate()) ="Saturday" Then RelativeDate(CurrentDate();5) ElseIf [v Next Dry]="Thursday" And DayName(CurrentDate()) ="Sunday "然后RelativeDate(CurrentDate();4)

ElseIf [v Next Dry]="Friday" And DayName(CurrentDate()) ="Monday" Then RelativeDate(CurrentDate();4) ElseIf [v Next Dry]="Friday" And DayName(CurrentDate()) ="Tuesday " Then RelativeDate(CurrentDate();3) ElseIf [v Next Dry]="Friday" And DayName(CurrentDate()) ="Wednesday" Then RelativeDate(CurrentDate();2) ElseIf [v Next Dry]="Friday" And DayName(CurrentDate()) ="Thursday" Then RelativeDate(CurrentDate();1) ElseIf [v Next Dry]="Friday" And DayName(CurrentDate()) ="Friday" Then RelativeDate(CurrentDate();7) ElseIf [v Next Dry]="Friday" And DayName(CurrentDate()) ="Saturday" Then RelativeDate(CurrentDate();6) ElseIf [v Next Dry]="Friday" And DayName(CurrentDate()) ="Sunday " 然后是相对日期(CurrentDate();5)

ElseIf [v Next Dry]="Saturday" And DayName(CurrentDate()) ="Monday" Then RelativeDate(CurrentDate();5) ElseIf [v Next Dry]="Saturday" And DayName(CurrentDate()) ="Tuesday " Then RelativeDate(CurrentDate();4) ElseIf [v Next Dry]="Saturday" And DayName(CurrentDate()) ="Wednesday" Then RelativeDate(CurrentDate();3) ElseIf [v Next Dry]="Saturday" And DayName(CurrentDate()) ="Thursday" Then RelativeDate(CurrentDate();2) ElseIf [v Next Dry]="Saturday" And DayName(CurrentDate()) ="Friday" Then RelativeDate(CurrentDate();1) ElseIf [v Next Dry]="Saturday" And DayName(CurrentDate()) ="Saturday" Then RelativeDate(CurrentDate();7) ElseIf [v Next Dry]="Saturday" And DayName(CurrentDate()) ="Sunday "然后RelativeDate(CurrentDate();6)

ElseIf [v Next Dry]="Sunday" And DayName(CurrentDate()) ="Monday" Then RelativeDate(CurrentDate();6) ElseIf [v Next Dry]="Sunday" And DayName(CurrentDate()) ="Tuesday " Then RelativeDate(CurrentDate();5) ElseIf [v Next Dry]="Sunday" And DayName(CurrentDate()) ="Wednesday" Then RelativeDate(CurrentDate();4) ElseIf [v Next Dry]="Sunday" And DayName(CurrentDate()) ="Thursday" Then RelativeDate(CurrentDate();3) ElseIf [v Next Dry]="Sunday" And DayName(CurrentDate()) ="Friday" Then RelativeDate(CurrentDate();2) ElseIf [v Next Dry]="Sunday" And DayName(CurrentDate()) ="Saturday" Then RelativeDate(CurrentDate();1) ElseIf [v Next Dry]="Sunday" And DayName(CurrentDate()) ="Sunday " 然后是相对日期(CurrentDate();7)

于 2019-03-14T16:14:32.467 回答