Going Kedarnath/Badrinath is different thing, as you need dedicated days for them.
But in case of Haridwar, you can visit with just a half day, just 55 kms from Dehradun and can get DDN-BSB, DDN-HWH or HW-HWH Superfast Express for Lucknow in night, after enjoying Ganga Aarti.