The UNIX "date" authority can be used to change date into number by using Unix time stamp. The Unix time stamp is number of seconds since January 1, 1970. The "+%s" option says to format the date as a UNIX timestamp. The "-d" option allows you to make out date as string. You can use an definite date, or a string such as "a week ago," "tomorrow," or "next year." If you do not specify string, "date" command will use current date.
Instructions
• Open terminal window.
• Type command "date +%s" to change present date into number.
• Type command "date -d 'Jan 1 2001' +%s" to change January 1, 2001, into number.
• Type command "exit" to end terminal session.



Reply With Quote
Bookmarks