This is interesting, since you could have swapped the positions of the >= and < in the formula:
correctedDate = :date - In Hours( 7 );
"WW" || Char( Week Of Year( correctedDate ) ) || "." || Char( Day Of Week( correctedDate ) - 1 ) ||
If( 0 < Hour( correctedDate ) <= 12,
"D",
"N"
);
I am working on a similar problem and the assignment of night vs day shift is slightly different, depending on which relative positions the < and <= symbols have in the if statement. It would be great to allow for direct use of timestamps inside the if formula (if time > 12:00:00 ...). Maybe it is, I haven't researched enough.
However, my main question: How did you decide where to put the < and <= symbols? Naturally, it is important to have an equal division of 12 hours per shift, but this could be achieved with both configurations (< before <=, and <= before <).