Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
Just a simple query. How to convert this if condition into set analysis?
=if(EndTime <= weekstart(Today()) and EndTime >= weekend(Today()), EndTime, Null())
This code is working.. I just want to use its set analysis counterpart (if its possible)
Thanks
Something like this?
only({<EndTime = {"<=$(=weekstart(Today()))>=$(=date(weekend(Today())))"}>} EndTime)
Something like this?
only({<EndTime = {"<=$(=weekstart(Today()))>=$(=date(weekend(Today())))"}>} EndTime)
null()
In other words, the code you posted will always return null. If your application is working, you did not post the code your application is using. The end time cannot simultaneously be <= the start of the week and >= the end of the week. Since that was probably a typo, go with aby's answer. You'll probably need a date() function around weekstart() too, though.
Ops! I pasted the wrong code. Thanks John!.