In this paper we present an in-depth analysis and analytical solution for time periodic hydrodynamic flow (driven by a time-dependent pressure gradient and electric field) of viscoelastic fluid through cylindrical micro-and nanochannels. Particularly, we solve the linearized Poisson-Boltzmann equation, together with the incompressible Cauchy momentum equation under no-slip boundary conditions for viscoelastic fluid in the case of a combination of time periodic pressure-driven and electro-osmotic flow. The resulting solutions allow us to predict the electrical current and solution flow rate. As expected from the assumption of linear viscoelasticity, the results satisfy the Onsager reciprocal relation, which is important since it enables an analogy between fluidic networks in this flow configuration and electric circuits. The results especially are of interest for micro-and nanofluidic energy conversion applications. We also found that time periodic electro-osmotic flow in many cases is much stronger enhanced than time periodic pressure-driven flow when comparing the flow profiles of oscillating PDF and EOF in micro-and nanochannels. The findings advance our understanding of time periodic electrokinetic phenomena of viscoelastic fluids and provide insight into flow characteristic as well as assist the design of devices for lab-on-chip applications.