Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I came across, something which looks a wierd behavior to me.
I have a chart, where in, the expression should have a condition.
So i have a variable created (in the variable overivew) which evaluates the recent most Friday.
its calculated as '=weekend(today(),-1,-2)'. which works fine when tested.
But in the expression, if i place the condition as if(theDate = RecentFriday,'then do this'), it doesn't work.
instead if I do if(theDate = '2/19/2010','then do this'). it works fine.
and i checked the value of the RecentFriday.... it shows 2/19/2010.
Any help would be greatly appreciated.
Thanks,
Rocky
Hi
Have you tried using variable expansion, like this:
if(theDate = '$(RecentFriday)','then do this')
regards
/Fredrik
Rocky,
Sometimes the problem in these cases is just date formatting. Try this as the condition: if(num(theDate) = num(RecentFriday)) and see if it works. I've also seen where the date format is actually DD/MM/YYYY even though the date shows as M/DD/YYYY. So try the above condition, and if it doesn't work try some different date-formatting combinations.
Regards,
Hi
Have you tried using variable expansion, like this:
if(theDate = '$(RecentFriday)','then do this')
regards
/Fredrik
for me it a problem of date mismatch types.
Try to Transform =weekend(today(),-1,-2) in =date(weekend(today(),-1,-2),'MM/DD/YYYY')
Hope this help
Bud
Thanks a lott guys...
Frederik.. you got it man.
I did try $(RecentFriday)... but did not try '$(RecentFriday)'... which worked... (just to emphasize... the quotes were missing)
Thanks all once again..
-Rocky