It is best consumed within 2 days.  The sweetness of sweet corn decreases and turns to starch over time.  But when eating right away is not possible it is best stored in the husks in the refrigerator.