Forum Discussion
Find current time between two dates (on same row) to enable a MTD calculation
frano72 - I'm not certain what you want as your end result. Given your sample data, what would your end result look like? If you are using nested IF statements, a better pattern is SWITCH(TRUE()...)
Hi Greg_Deckler,
I'm basically after a column that has a 1 or a 0 in it which I can then use as a filter and could be called CurrenReportingMonth
The simplistic logic is :
if the dataset refreshed at anytime during the 2 x 12 hour shifts that are considered the first of the month (eg Aug 1st) - then each row for July has a 1 in it, 0's every where else. As soon as we exit Aug 1st and are in Aug 2, then there are 1s for all rows for August.
I need to be able to compare refresh time (UTCNOW) with the two shiftstart, shiftend columns in the roster table to determine the current day/month combo and then use that to then calculate for each row whether its a 1 or 0.
So first step to sovle is how to find UTCNOW between two columns of dates and return a value from another column for that row.
thanks !