When was calligraphy created in Ancient China?

It was created during the Shang dynasty.