  Let $E$ be an arbitrary subset of $\mathbb{R}^n$, and $f:E\to\mathbb{R}$,
$G:E\to\mathbb{R}^n$ be given functions. We provide necessary and sufficient
conditions for the existence of a convex function $F\in
C^{1,1}_{\textrm{loc}}(\mathbb{R}^n)$ such that $F=f$ and $\nabla F=G$ on $E$.
We give a useful explicit formula for such an extension $F$, and a variant of
our main result for the class $C^{1, \omega}_{\textrm{loc}}$, where $\omega$ is
a modulus of continuity. We also present two applications of these results,
concerning how to find $C^{1,1}_{\textrm{loc}}$ convex hypersurfaces with
prescribed tangent hyperplanes on a given subset of $\mathbb{R}^n$, and some
explicit formulas for (not necessarily convex) $C^{1,1}_{\textrm{loc}}$
extensions of $1$-jets.
