todate function subtracting date with day minus one day
Discussion posts and replies are publicly visible
this may help