Smart answer:

Your search for When was art of war written returned the following results:

6th century BCE

The Art of War (孫子兵法), written during the 6th century BCE by Sun Tzu (孫子), deals directly with military warfare but contains ideas that are used in the Chinese martial arts.

Source:

in 5th century BC

Written by military strategist Sun Tzu in 5th century BC, “The Art of War” is composed of thirteen chapters, each one dedicated to a different element of warfare and warfare's relation to overall military strategy.

in the 4th or 5th century BCE by Chinese general Sun Tzu (also known as Sunzi or )

The Art of War is the oldest surviving manuscript on military tactics from Ancient China’s hallowed martial tradition, reportedly written in the 4th or 5th century BCE by Chinese general Sun Tzu (also known as Sunzi or “Master Sun”).

Source:

written by the 6th century Chinese author Sun Tzu

The Art of War' is a military strategy book written by the 6th century Chinese author Sun Tzu.

Source:

in 500BC

The Art of War written in 500BC by Sun Tzu, a Chinese military general, is a classic, then and now, because a classic challenges the assumptions that many people have about strategy.

In 1521

Machiavelli wrote verse, plays, and short prose, penned The Art of War (published in 1521), and produced biographical and historical sketches.

by the Chinese philosopher-general and military strategist, Sun Tzu, around 500 B.C. Concise and direct

The Art of War is the military classic written by the Chinese philosopher-general and military strategist, Sun Tzu, around 500 B.C. Concise and direct,