We study the interaction between tides and convection in astrophysical bodies by analysing the effect of a homogeneous oscillatory shear on a fluid flow. This model can be taken to represent the interaction between a large-scale periodic tidal deformation and a smaller scale convective motion. We first consider analytically the limit in which the shear is of low amplitude and the oscillation period is short compared to the time-scales of the unperturbed flow. In this limit there is a viscoelastic response and we obtain expressions for the effective elastic modulus and viscosity coefficient. The effective viscosity is inversely proportional to the square of the oscillation frequency, with a coefficient that can be positive, negative or zero depending on the properties of the unperturbed flow. We also carry out direct numerical simulations of Boussinesq convection in an oscillatory shearing box and measure the time-dependent Reynolds stress. The results indicate that the effective viscosity of turbulent convection falls rapidly as the oscillation frequency is increased, attaining small negative values in the cases we have examined, although significant uncertainties remain because of the turbulent noise. We discuss the implications of this analysis for astrophysical tides.