How to convert time/date formats between timestamp and date-time human-readable format.

Print the current epoch/Unix timestamp

Code:
date +%s
Example:
Code:
$ date +%s
1262324557
Timestamp to date convertion
date -d @XXXXXX will convert a particular timestamp to readbale date and time format
Example:
Code:
$ date -d @1262324557
Fri JanĀ  1 00:42:37 EST 2010

Date to Unix timestamp conversion
Provide the date and time in a specified format as shown below for converting to epoch time.
Code:
date -d 'DD/MM/YYYY HH:MM:SS' +%s
Example:
Code:
$ date -d '01/01/2010 00:42:37' +"%s"
1262324557