once upon a time vs time was when

once upon a time

adv
  • A long time ago; at some time in the past (a traditional beginning of children's stories, especially fairy tales). 

time was when

How often have the words once upon a time and time was when occurred in a corpus of books? (source: Google Ngram Viewer )