Saturday, 21 January 2017

Today's quick fix

Faced with data looking like in the table below, a bit of calculated field magic does the trick as there is an implied stop date that is not always the same as the start date.

Date
Start
Stop
01/12/2016
01:30
03:00
15/12/2016
05:30
07:00
16/12/2016
12:00
15:30
28/12/2016
21:00
02:30
Start timestamp
 dateparse('dd/MM/yyyy HH:mm',[Date]+' '+[Start])
Stop timestamp
dateparse('dd/MM/yyyy HH:mm',[Date]+' '+[Stop])+(if [Stop]<[Start] then 1 else 0 end)





No comments:

Post a Comment