【发布时间】:2019-04-04 19:13:02
【问题描述】:
它所在的源表:
ID Date_Start Date_End DayOfWeek Time_Start Time_End field1
1 01/02/2018 15/02/2018 4 08:00:00 10:00:00 text1
2 01/06/2018 15/06/2018 2 10:00:00 13:00:00 text1
第 4 天代表星期四,因此我只想生成 DayOfWeek 的日期和时间(源表中的 (4)Thursday 和 (2)Tuesday)。
我想得到这个输出:
Date hour field1
01/02/2018 08 text1
01/02/2018 09 text1
01/02/2018 10 text1
08/02/2018 08 text1
08/02/2018 09 text1
08/02/2018 10 text1
15/02/2018 08 text1
15/02/2018 09 text1
15/02/2018 10 text1
05/06/2018 10 text1
05/06/2018 11 text1
05/06/2018 12 text1
05/06/2018 13 text1
12/06/2018 10 text1
12/06/2018 11 text1
12/06/2018 12 text1
12/06/2018 13 text1
我尝试编辑此good answer,使用 *24 来获取小时数但没办法!
谢谢。
【问题讨论】: