根据工作时间添加DateTime [英] Add DateTime as per working hours
问题描述
你好朋友,
现在假设当前的日期时间是27-05-12 15:00
我要添加:-1天5小时00分钟
或
假设您的工作时间为9:00到17:00(5点)
1-您在27-05-12 15:00(日期时间)完成了一项任务
2-而且您说我将花费13个小时来完成此任务.
3-这意味着今天您有2个小时(15:00到17:00)工作,明天有8个小时(9:00到17:00)工作,后天有3个小时(9:00到12:00)工作完成13个小时.因此,完成此任务的输出日期时间将如下所示
输出应为:
12-05-29 12:00
注意:结论是当您说我将花费780分钟或13小时时,系统会自动计算完成日期时间
谢谢与问候,
Taposi.
Hello Friends,
Assume now the current Date Time is 27-05-12 15:00
I want to add:-1 days 5 hours 00 min
Or
Suppose your working Hour is 9:00 to 17:00(5’o clock)
1-You got one task at 27-05-12 15:00 (Date time)
2-And you said I will take 13 hours to complete this task.
3-That’s mean today you have 2 Hours(15:00 to 17:00) work and tomorrow 8(9:00 to 17:00) Hours works and day after tomorrow 3(9:00 to 12:00) hours works to finish 13 hours. So the Output date time to finish this task will be will be as follows
Output should be:
29-05-12 12:00
Note: conclusion is that when you will say I will take 780 min or 13 Hours system automatically calculate the finish Date time
Thanks & Regards,
Taposi.
推荐答案
看看这篇出色的文章: ^ ].
Have a look at this excellent article: Time Period Library for .NET[^].
这篇关于根据工作时间添加DateTime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!