Join Date: May 2006
Location: New York, London, Sydney
Programs: United GS/2MM, DL*P, VS*G, AA*EXP, Avis CHM, Hertz Platinum, Sixt*D, HH*D, HGP*P, Starwood*P
Posts: 9,881
You can refund it whenever if it is truly a refundable ticket, including after departure. Only after the ticket is over a year old does it get a little tricky. You can still get it done, but takes more effort and I think there is a fee involved.
The notion of needing to cancel before departure to retain any value is a concept that applies only to non-refundable tickets (on United - other airlines have "no show" penalties on refundable tickets).