This paper addresses the discretisation problem for sparse linear systems. Classical methods usually destroy sparsity patterns of continuous-time systems. We develop an optimisation procedure that yields the best approximation to the discrete-time dynamical matrix with a prescribed sparsity pattern and subject to stability and other constraints. By formulating this problem in an adequate manner, tools from convex optimisation can be then applied. Error bounds for the approximation are provided for special classes of matrices. Numerical examples are included.