In this work, we use a test based on the differential ages of galaxies for distinguishing the dark energy models. As proposed by Jimenez and Loeb in [1], relative ages of galaxies can be used to put constraints on various cosmological parameters. In the same vein, we reconstruct H0dt/dz and its derivative (H0d2t/dz2) using a model independent technique called non-parametric smoothing. Basically, dt/dz is the change in the age of the object as a function of redshift which is directly linked with the Hubble parameter. Hence for reconstruction of this quantity, we use the most recent H(z) data. Further, we calculate H0dt/dz and its derivative for several models like Phantom, Einstein de Sitter (EdS), ΛCDM, Chevallier-Polarski-Linder (CPL) parametrization, Jassal-Bagla-Padmanabhan (JBP) parametrization and Feng-Shen-Li-Li (FSLL) parametrization. We check the consistency of these models with the results of reconstruction obtained in a model independent way from the data. It is observed that H0dt/dz as a tool is not able to distinguish between the ΛCDM, CPL, JBP and FSLL parametrizations but, as expected, EdS and Phantom models show noticeable deviation from the reconstructed results. Further, the derivative of H0dt/dz for various dark energy models is more sensitive at low redshift. It is found that the FSLL model is not consistent with the reconstructed results, however, the ΛCDM model is in concordance with the 3σ region of the reconstruction at redshift z≥ 0.3.