My friend and I are in the middle of davening Shmoneh Esreh. Rather than talk, I text him, "I don't remember if today is Rosh Hodesh. Do we say 'Ya'aleh V'yavo?'" Can I interrupt my friend for this purpose so I know what to do, and can he text me the response (interrupt his own davening)?
In general, most explanations deal with one interrupting ones own shmoneh esrai and explain that it is such a serious matter that one cannot interrupt unless it is a pikuach nefesh matter. For example Interrupting the Amidah for Important Matters dicusses when one is allowed to interrupt the Shmoneh esrai. In this case, you are interrupting not only your own shmoneh esrai but that of your friend.
In fact, the Mishna, Berachot 30b, states that one may not interrupt one's Amidah even if the king asks one about one's welfare or if a snake is climbing up one's leg.
This means that your friend would not be allowed to interrupt his shmoneh esrai in order to respond to you no matter what you were asking. Thus, since he is not allowed to respond, you would not be allowed to interrupt him.
The links that I show do deal with the situation in which you must interrupt your shmoneh esrai in order to be able to daven further. It seems to say that you are allowed to interrupt your shmoneh esrai in order to check the date so that the halachic question can be answered.
Rav Moshe Feinstein deals with the case in which a person notices his neighbor making a mistake and discusses when he can interrupt his own davening to point it out. He does not deal with the case of a person interrupting someone else to ask for help. One can attempt to claim that he would not allow that, but I do not have the Igros Moshe to be able to get the full details and see what he might say.
However, given the various types of interruptions that are dealt with in the various citations, it would appear (to me at least) that the preference is to first check yourself (such as by going to the calendar on the wall) and if that is not available, ask someone who may be interrupted (ssuch as having finishe shmoneh esraifor an answer.
From the way I read the various sources, it would appear that this means one should not interrupt someone else who is in the middle of Shmoneh Esrai. As I said above, the person that one would be interrupted would appear to not be allowed to respond.
There is a machlokes between the Rama and the Shulchan Aruch (see below) as to whether you would have to start from the beginning or not if it takes too much time to get the answer.
Interrupting the Amidah for Purposes Relevant to Prayer
There are a number of scenarios that arise where it would be beneficial to interrupt one's Amidah for a matter relevant to the prayer service itself. R. Avraham Danzig (1748-1820), Chayei Adam 25:9, discusses a case of someone who realizes that he has a halachic question regarding a mistake he made in his recitation of the Amidah. He rules that one may certainly walk to another place in the middle of his Amidah in order to find the answer to his question in a book. He suggests that one may also ask a rabbi a question in the middle of his Amidah. Mishna Berurah 104:2, codifies the opinion of Chayei Adam.
R. Moshe Feinstein (1896-1985), Igrot Moshe, Orach Chaim 4:16, discusses the case of someone who hears his neighbor make a mistake in the Amidah. He writes that if one is between berachot, one may tell the neighbor that he erred in his prayer, even if the mistake would not invalidate the Amidah. However, one should not speak in the middle of an individual beracha.
. This is what is written in Tefillah Kehilchatah 12:86, in the name of Rav Elyashiv. He adds that even if there is a knock at the door which is distracting him so much that he cannot continue praying with kavanah, he is permitted to open the door and hint to the person that he cannot talk right now. As for the matter of perusing through a book to determine the halachah, Yalkut Yosef 104:5 writes that although there are poskim who forbid walking to look something up, he himself agrees that it is permissible, but that asking a rabbi is forbidden. Nevertheless, it seems that if this law will determine whether or not he fulfills his obligation, it is best that he ask, as the Mishnah Berurah states. If possible, it is best that he writes his question down on a piece of paper, instead of interrupting with words. If, in the meantime, enough time passed in which he could have recited the entire Amidah, according to the Shulchan Aruch 104:5, he must start it from the beginning. However, the Rama maintains that he only goes back to the beginning when the interruption is due to circumstances beyond his control.
If one arrives at Al HaNisim during Chanukah or Purim and he does not remember the words, he is permitted to walk to get a siddur in order to recite it, despite the fact that failing to recite it does not prevent him from fulfilling his obligation of reciting the Amidah. If possible, it is better that he hints to someone to bring him a siddur. It seems that it is forbidden to walk in order to verify a law that for certain does not prevent someone from fulfilling his obligation, since the study of the halachah distracts one’s thoughts from his prayer, and that constitutes more of an interruption. Therefore, as long as it is clear that it is not a matter that prevents him from fulfilling his obligation, he may not look it up. So writes the Beit Baruch 25:22.