Sanskrit, as defined by Pāṇini, evolved out of the earlier Vedic form. The present form of Vedic Sanskrit can be traced back to as early as the second millennium BCE (for Rig-vedic). Scholars often distinguish Vedic Sanskrit and Classical or "Pāṇinian" Sanskrit as separate dialects. Though they are quite similar, they differ in a number of essential points of phonology, vocabulary, grammar and syntax. Vedic Sanskrit is the language of the Vedas, a large collection of hymns, incantations (Samhitas) and theological and religio-philosophical discussions in the Brahmanas and Upanishads. Modern linguists consider the metrical hymns of the Rigveda Samhita to be the earliest, composed by many authors over several centuries of oral tradition. The end of the Vedic period is marked by the composition of the Upanishads, which form the concluding part of the traditional Vedic corpus; however, the early Sutras are Vedic, too, both in language and content.
To what time can the present form of Sanskrit be traced?
second millennium BCE