Convert unix timestamp to date

# date -d @1221256800 "+%Y-%m-%d %T"
2008-09-13 00:00:00

Convert a date (YYYYMMDD) to unix timestamp

# date -d "20080913" +%s
1221256800