This is only at the completion of an activity; common examples are ありがとうございました "arigatō gozaimashita" "thank you (for a completed favor)", ご馳走様でした "go-chisō-sama deshita" "it was a feast (for a completed meal)", 失礼しました "shitsurei shimashita" "I have been rude (when leaving, after a visit)".