How long ago was the first limestone formed?
Probably at the Hadean or at the beginning of the Archean, but there is no geological registry.

The mechanism that can lead to inorganic limestone formation is weathering of magmatic carbonatite rocks. I found Siilinjärvi carbonatite complex in Fennoscandia is dated 2.6Ga (Tichomirowa et al, 2013), so Archean. It is the oldest one I found.

Another mechanism that could produce limestones in ancient eons is described by user @BillDOe in this related answer:


  Once life evolved in the world's oceans, the vast majority of
  limestone formation has been through the organic process. However,
  before life did evolve, limestone formed through an inorganic process
  where rain water falling through a CO2-rich atmosphere reacted to form
  a weak carbonic acid solution that then reacted with
  calcium-containing minerals to form calcites. This then washed into
  the world's oceans to form limestone deposits.


The premise comes from this stanford.edu work and is a bit controversial because there are no proofs limestones formed by this mechanism.



International Stratigraphic Chart image

M. Tichomirowa, M.J. Whitehouse, A. Gerdes, J. Götze, B. Schulz, B.V. Belyatsky (2013): "Different zircon recrystallization types in carbonatites caused by magma mixing: Evidence from U–Pb dating, trace element and isotope composition (Hf and O) of zircons from two Precambrian carbonatites from Fennoscandia", Chemical Geology, Volume 353, Pages 173-198, ISSN 0009-2541.
https://doi.org/10.1016/j.chemgeo.2012.11.004.